mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 05:20:33 +08:00
10 lines
341 B
TypeScript
10 lines
341 B
TypeScript
'use client'
|
|
|
|
import { useSearchParams } from 'next/navigation'
|
|
import { activeWorkspaceId, workspaceIdOf } from '@/lib/workspace-scope'
|
|
|
|
/** The workspace this tab is in, for render: the URL's, else the one it stayed in. */
|
|
export function useActiveWorkspaceId(): string {
|
|
return workspaceIdOf(useSearchParams()) ?? activeWorkspaceId()
|
|
}
|