diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 239ee8d7..2e4b8860 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -267,7 +267,7 @@ devDependencies: version: 7.4.1 drizzle-kit: specifier: ^0.20.16 - version: 0.20.16 + version: 0.20.17 eslint: specifier: ^8.57.0 version: 8.57.0 @@ -6324,8 +6324,8 @@ packages: wordwrap: 1.0.0 dev: true - /drizzle-kit@0.20.16: - resolution: {integrity: sha512-WoqV0XDny8mHnVoLYcUs6H3Ae1HBxeV0zi3VXG/mTahIQYfadZmIc3eRqzXjD3yxemj+GdHI1nThddmsoabdIA==} + /drizzle-kit@0.20.17: + resolution: {integrity: sha512-mLVDS4nXmO09wFVlzGrdshWnAL+U9eQGC5zRs6hTN6Q9arwQGWU2XnZ17I8BM8Quau8CQRx3Ms6VPgRWJFVp7Q==} hasBin: true dependencies: '@esbuild-kit/esm-loader': 2.6.5 diff --git a/src/app/(dashboard)/dashboard/_components/store-switcher.tsx b/src/app/(dashboard)/dashboard/_components/store-switcher.tsx index 9b556128..95605fe9 100644 --- a/src/app/(dashboard)/dashboard/_components/store-switcher.tsx +++ b/src/app/(dashboard)/dashboard/_components/store-switcher.tsx @@ -10,7 +10,7 @@ import { } from "@radix-ui/react-icons" import { type getStoresByUserId } from "@/lib/actions/store" -import { type getProgress } from "@/lib/queries/user" +import { type getUserPlanMetrics } from "@/lib/queries/user" import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { @@ -28,19 +28,19 @@ import { PopoverTrigger, } from "@/components/ui/popover" -import { AddStoreDialog } from "../stores/_components/add-store-dialog" +import { CreateStoreDialog } from "../stores/_components/create-store-dialog" interface StoreSwitcherProps extends React.ComponentPropsWithoutRef { userId: string storesPromise: ReturnType - progressPromise: ReturnType + planMetricsPromise: ReturnType } export function StoreSwitcher({ userId, storesPromise, - progressPromise, + planMetricsPromise, className, ...props }: StoreSwitcherProps) { @@ -51,15 +51,15 @@ export function StoreSwitcher({ const [showNewStoreDialog, setShowNewStoreDialog] = React.useState(false) const stores = React.use(storesPromise) - const progress = React.use(progressPromise) + const planMetrics = React.use(planMetricsPromise) const selectedStore = stores.find((store) => store.id === storeId) return ( <> - {selectedStore?.name ?? "Select a store"}