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 StreamViewProps {
streamParticle: Particle;
networkId: string;
particleSegments: string[];
path: ParticlePath;
}
export function StreamView({ networkId, particleSegments, streamParticle }: StreamViewProps) {
const { children, error, isLoading } = useParticleChildren(networkId, particleSegments);
export function StreamView({ path, streamParticle }: StreamViewProps) {
const { children, error, isLoading } = useLiveParticleChildren(path);
return (
<div className="flex h-full items-center justify-center">
<p className="text-muted-foreground text-sm">
Stream view {networkId}/{particleSegments.join("/")}
Stream view {streamParticle.id}
</p>
{isLoading && <p className="text-muted-foreground text-sm">Loading stream data...</p>}