add billing

This commit is contained in:
2025-12-12 20:28:47 -03:00
parent 3147ec2317
commit c516960b01
16 changed files with 496 additions and 97 deletions

View File

@@ -56,7 +56,7 @@ export function WorkspaceProvider({
}) {
const { orgid } = useParams()
const [activeWorkspace, setActiveWorkspace] = useState<Workspace | any>(
() => workspaces.find((ws) => ws.id === orgid) || {}
() => workspaces.find(({ id }) => id === orgid) || {}
)
return (
@@ -70,14 +70,13 @@ export function WorkspaceProvider({
export function WorkspaceSwitcher() {
const location = useLocation()
const { orgid } = useParams()
const { isMobile, state } = useSidebar()
const { activeWorkspace, setActiveWorkspace, workspaces } = useWorksapce()
const [, fragment, _] = location.pathname.slice(1).split('/')
const onSelect = (ws: Workspace) => {
setActiveWorkspace(ws)
window.location.assign(`/${ws.id}/${fragment}`)
const onSelect = (workspace: Workspace) => {
setActiveWorkspace(workspace)
window.location.assign(`/${workspace.id}/${fragment}`)
}
return (