feat(ST-903): load active product in layout, replace cookie with DB lookup in solo
- layout.tsx: fetch active_product_id, resolve product, clear stale ref server-side - NavBar: add activeProduct prop (rendering changes in ST-904) - solo/page.tsx: redirect via user.active_product_id instead of lastProductId cookie - proxy.ts: remove lastProductId cookie logic - lib/cookies.ts: deleted (no longer used) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
35d60cc43b
commit
12d81a172f
5 changed files with 34 additions and 44 deletions
|
|
@ -15,9 +15,10 @@ interface NavBarProps {
|
|||
userId: string
|
||||
username: string
|
||||
email: string | null
|
||||
activeProduct: { id: string; name: string } | null
|
||||
}
|
||||
|
||||
export function NavBar({ isDemo, roles, userId, username, email }: NavBarProps) {
|
||||
export function NavBar({ isDemo, roles, userId, username, email, activeProduct: _activeProduct }: NavBarProps) {
|
||||
const pathname = usePathname()
|
||||
const currentProduct = useProductStore(s => s.currentProduct)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue