supermemory/apps/web/app/(app)/settings/page.tsx
Mahesh Sanikommu 6d1ee8478b feat(settings): URL-driven settings modal
Convert settings from a dedicated /settings page into a modal driven by ?settings=<tab> URL state, opened from the profile menu, header, bottom nav, and command palette. Old /settings#<tab> links redirect into it.

- Shared SettingsContent (rail nav + tabs) rendered by the modal
- Rail-top org switcher with create-organization
- Account: carded profile + plan badge, Overview stat tiles, toggle-based Org Context, compact Team members (hides own row when solo)
- Integrations nav and the MCP connect button link out to the integrations view (cat=ai-clients)
- Billing: drop unused payment_method expand that slowed plan load
- Fix nested-button hydration error in FeaturedHero
2026-06-08 18:43:23 -07:00

23 lines
641 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" ? "/?view=integrations" : `/?settings=${tab}`,
)
}, [router])
return null
}