add billing
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
import {
|
||||
BookCopyIcon,
|
||||
CalendarClockIcon,
|
||||
FileBadgeIcon,
|
||||
// FileBadgeIcon,
|
||||
GraduationCap,
|
||||
LayoutDashboardIcon,
|
||||
ReceiptTextIcon,
|
||||
ShieldUserIcon,
|
||||
ShoppingCartIcon,
|
||||
UploadIcon,
|
||||
// UploadIcon,
|
||||
UsersIcon
|
||||
} from 'lucide-react'
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
'use client'
|
||||
|
||||
import { type LucideIcon } from 'lucide-react'
|
||||
import { NavLink, useParams } from 'react-router'
|
||||
|
||||
import {
|
||||
SidebarGroup,
|
||||
SidebarGroupContent,
|
||||
@@ -11,9 +14,6 @@ import {
|
||||
} from '@repo/ui/components/ui/sidebar'
|
||||
import { useIsMobile } from '@repo/ui/hooks/use-mobile'
|
||||
|
||||
import { type LucideIcon } from 'lucide-react'
|
||||
import { NavLink, useParams } from 'react-router'
|
||||
|
||||
type NavItem = {
|
||||
title: string
|
||||
url: string
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user