feat: jump to my newly created particle once created

This commit is contained in:
talksik
2026-03-24 10:27:50 -07:00
parent 1fb31a0d04
commit 6f033e2a73
3 changed files with 25 additions and 2 deletions
@@ -110,6 +110,7 @@ export function StreamView({ path, streamParticle }: StreamViewProps) {
next,
prev,
goTo,
goToParticle,
pause,
resume,
} = useStreamPlayback(streamParticle, path);
@@ -188,6 +189,11 @@ export function StreamView({ path, streamParticle }: StreamViewProps) {
[prev, next],
);
const onLocalParticleCreated = useCallback(
(particleId: string) => {
goToParticle(particleId);
}, [goToParticle]);
if (children.length === 0) {
return (
<div className="flex h-full flex-col items-center justify-center gap-4 bg-black text-white">
@@ -264,6 +270,7 @@ export function StreamView({ path, streamParticle }: StreamViewProps) {
networkId={networkId!}
targetPath={path}
onActiveChange={setComposeActive}
onParticleCreated={onLocalParticleCreated}
/>
{/* Bottom overlay: stream info + reply */}