kumarabhirup 1c21b039fc
refactor(web): consolidate workspace onto root route with URL state machine
Move the workspace shell from /workspace to / and introduce a typed URL state codec (parseUrlState/serializeUrlState) for deep-linkable workspace params. Legacy /workspace URLs are still recognized for backward compatibility.
2026-03-05 19:09:29 -08:00

25 lines
712 B
TypeScript

"use client";
import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { UnicodeSpinner } from "../components/unicode-spinner";
/**
* Legacy /workspace route: redirect to root preserving query params.
*/
export default function WorkspaceRedirectPage() {
const router = useRouter();
useEffect(() => {
const qs = window.location.search;
const hash = window.location.hash;
router.replace(`/${qs}${hash}`);
}, [router]);
return (
<div className="flex h-screen items-center justify-center" style={{ background: "var(--color-bg)" }}>
<UnicodeSpinner name="braille" className="text-2xl" style={{ color: "var(--color-text-muted)" }} />
</div>
);
}