refactor: restructure state, routing, and more

This commit is contained in:
talksik
2026-03-18 13:11:29 -07:00
parent 0149450bc4
commit 092d142a56
16 changed files with 218 additions and 482 deletions
+6 -6
View File
@@ -1,19 +1,19 @@
import { Particle } from "@/api/types";
import { useParticleChildren } from "@/hooks/use-particle-children";
import { useLiveParticleChildren } from "@/hooks/use-particle";
import type { ParticlePath } from "@/lib/particle-path";
interface FolderViewProps {
folderParticle: Particle;
networkId: string;
particleSegments: string[];
path: ParticlePath;
}
export function FolderView({ networkId, particleSegments, folderParticle }: FolderViewProps) {
const { children, error, isLoading } = useParticleChildren(networkId, particleSegments);
export function FolderView({ path, folderParticle }: FolderViewProps) {
const { children, error, isLoading } = useLiveParticleChildren(path);
return (
<div className="flex h-full items-center justify-center">
<p className="text-muted-foreground text-sm">
Folder view {networkId}/{particleSegments.join("/")}
Folder view {folderParticle.id}
</p>
</div>
);