supermemory/apps/web/app/(app)/settings/page.tsx
MaheshtheDev 1e1b0b1a37 feat(web): make /integrations a real route with connect deeplinks (#1155)
- Promote integrations from ?view=integrations to real /integrations and nested /integrations/[card] routes; the page body is shared via AppExperience and useViewMode is path-aware.
- Legacy ?view= URLs (and /settings/integrations) redirect to the new routes for back-compat; middleware/ensure-workspace allow the public routes.
- Add ?connect=<plugin|provider> deeplink that opens a card's connect modal instantly with a loading state (e.g. Hermes API key).
2026-06-23 20:42:29 +00:00

23 lines
635 B
TypeScript

"use client"
import { useEffect } from "react"
import { useRouter } from "next/navigation"
import { parseHashToTab } from "@/components/settings/settings-content"
/**
* Legacy redirect: /settings (and /settings#billing etc.) now open the
* settings modal via the ?settings=<tab> URL state on the home page.
*/
export default function SettingsRedirect() {
const router = useRouter()
useEffect(() => {
const hash = typeof window !== "undefined" ? window.location.hash : ""
const tab = parseHashToTab(hash)
router.replace(
tab === "integrations" ? "/integrations" : `/?settings=${tab}`,
)
}, [router])
return null
}