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

@@ -3,13 +3,13 @@
import {
BookCopyIcon,
CalendarClockIcon,
FileBadgeIcon,
// FileBadgeIcon,
GraduationCap,
LayoutDashboardIcon,
ReceiptTextIcon,
ShieldUserIcon,
ShoppingCartIcon,
UploadIcon,
// UploadIcon,
UsersIcon
} from 'lucide-react'

View File

@@ -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

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 (