import { useParticle } from "@/hooks/use-particle"; import { StreamView } from "./stream-view"; import { FolderView } from "./folder-view"; import { ParticleListView } from "./particle-list-view"; import { isContainerType } from "@/api/types"; interface ParticleViewResolverProps { networkId: string; particleSegments: string[]; } /** * Resolves a particle by its path segments and renders the appropriate view * based on particle type. This is the extensibility point for future particle types. */ export function ParticleViewResolver({ networkId, particleSegments }: ParticleViewResolverProps) { const { particle, isLoading, error } = useParticle(networkId, particleSegments); if (isLoading) { return (
Loading...
Failed to load particle
Particle: {particleSegments.join(" / ")}
{particle.type} particle: {particle.id}