mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-07 08:26:15 +00:00
- 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).
23 lines
635 B
TypeScript
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
|
|
}
|