From adb8bb62e6b102294ebae81517e7e4fb0cf0aac4 Mon Sep 17 00:00:00 2001 From: Franjo Mindek <84568328+FranjoMindek@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:03:59 +0100 Subject: [PATCH] Move shadcn directories to client shared folder + update shadcn docs a bit (#551) --- opensaas-sh/app_diff/README.md.diff | 6 +--- .../client/components/NavBar/NavBar.tsx.diff | 4 +-- .../src/client/components/RepoInfo.tsx.diff | 4 +-- .../components/ui/button.tsx.diff | 12 ++----- .../{ => client}/components/ui/card.tsx.diff | 4 +-- .../src/{lib => client}/utils.ts.diff | 4 +-- .../components/Examples/Auth.tsx.diff | 6 ++-- .../components/Hero/Hero.tsx.diff | 2 +- .../components/Hero/Orbit.tsx.diff | 2 +- .../src/payment/paymentProcessor.ts.diff | 2 +- .../app_diff/src/payment/stripe/user.ts.diff | 10 +++--- template/app/.cursor/rules/ui-components.mdc | 33 +++++++++++-------- template/app/README.md | 4 --- template/app/components.json | 10 +++--- .../analytics/AnalyticsDashboardPage.tsx | 2 +- .../analytics/TotalPageViewsCard.tsx | 8 +++-- .../analytics/TotalPayingUsersCard.tsx | 8 +++-- .../dashboards/analytics/TotalRevenueCard.tsx | 8 +++-- .../dashboards/analytics/TotalSignupsCard.tsx | 8 +++-- .../dashboards/users/DropdownEditDelete.tsx | 2 +- .../src/admin/dashboards/users/UsersTable.tsx | 14 ++++---- .../admin/elements/settings/SettingsPage.tsx | 10 +++--- .../elements/ui-elements/ButtonsPage.tsx | 2 +- template/app/src/admin/layout/Header.tsx | 2 +- template/app/src/admin/layout/Sidebar.tsx | 2 +- template/app/src/client/App.tsx | 2 +- .../client/components/DarkModeSwitcher.tsx | 4 +-- .../src/client/components/NavBar/NavBar.tsx | 4 +-- .../{ => client}/components/ui/accordion.tsx | 2 +- .../src/{ => client}/components/ui/alert.tsx | 2 +- .../src/{ => client}/components/ui/avatar.tsx | 2 +- .../src/{ => client}/components/ui/button.tsx | 4 +-- .../src/{ => client}/components/ui/card.tsx | 2 +- .../{ => client}/components/ui/checkbox.tsx | 2 +- .../src/{ => client}/components/ui/dialog.tsx | 2 +- .../components/ui/dropdown-menu.tsx | 2 +- .../src/{ => client}/components/ui/form.tsx | 2 +- .../src/{ => client}/components/ui/input.tsx | 2 +- .../src/{ => client}/components/ui/label.tsx | 2 +- .../{ => client}/components/ui/progress.tsx | 2 +- .../src/{ => client}/components/ui/select.tsx | 2 +- .../{ => client}/components/ui/separator.tsx | 2 +- .../src/{ => client}/components/ui/sheet.tsx | 2 +- .../src/{ => client}/components/ui/switch.tsx | 2 +- .../{ => client}/components/ui/textarea.tsx | 2 +- .../src/{ => client}/components/ui/toast.tsx | 2 +- .../{ => client}/components/ui/toaster.tsx | 0 .../app/src/{ => client}/hooks/use-toast.ts | 0 .../{useColorMode.tsx => useColorMode.ts} | 0 .../hooks/{useDebounce.tsx => useDebounce.ts} | 0 ...eIsLandingPage.tsx => useIsLandingPage.ts} | 0 ...useLocalStorage.tsx => useLocalStorage.ts} | 0 template/app/src/{lib => client}/utils.ts | 0 template/app/src/demo-ai-app/DemoAppPage.tsx | 16 ++++----- .../app/src/file-upload/FileUploadPage.tsx | 18 +++++----- .../components/ExamplesCarousel.tsx | 2 +- .../app/src/landing-page/components/FAQ.tsx | 2 +- .../landing-page/components/FeaturesGrid.tsx | 4 +-- .../app/src/landing-page/components/Hero.tsx | 2 +- .../components/HighlightedFeature.tsx | 2 +- .../landing-page/components/Testimonials.tsx | 2 +- template/app/src/payment/PricingPage.tsx | 8 ++--- template/app/src/payment/stripe/webhook.ts | 4 +-- template/app/src/user/AccountPage.tsx | 6 ++-- template/app/src/user/UserDropdown.tsx | 2 +- 65 files changed, 146 insertions(+), 139 deletions(-) rename opensaas-sh/app_diff/src/{ => client}/components/ui/button.tsx.diff (60%) rename opensaas-sh/app_diff/src/{ => client}/components/ui/card.tsx.diff (87%) rename opensaas-sh/app_diff/src/{lib => client}/utils.ts.diff (80%) rename template/app/src/{ => client}/components/ui/accordion.tsx (98%) rename template/app/src/{ => client}/components/ui/alert.tsx (97%) rename template/app/src/{ => client}/components/ui/avatar.tsx (97%) rename template/app/src/{ => client}/components/ui/button.tsx (85%) rename template/app/src/{ => client}/components/ui/card.tsx (98%) rename template/app/src/{ => client}/components/ui/checkbox.tsx (96%) rename template/app/src/{ => client}/components/ui/dialog.tsx (99%) rename template/app/src/{ => client}/components/ui/dropdown-menu.tsx (99%) rename template/app/src/{ => client}/components/ui/form.tsx (99%) rename template/app/src/{ => client}/components/ui/input.tsx (95%) rename template/app/src/{ => client}/components/ui/label.tsx (94%) rename template/app/src/{ => client}/components/ui/progress.tsx (95%) rename template/app/src/{ => client}/components/ui/select.tsx (99%) rename template/app/src/{ => client}/components/ui/separator.tsx (95%) rename template/app/src/{ => client}/components/ui/sheet.tsx (99%) rename template/app/src/{ => client}/components/ui/switch.tsx (96%) rename template/app/src/{ => client}/components/ui/textarea.tsx (94%) rename template/app/src/{ => client}/components/ui/toast.tsx (99%) rename template/app/src/{ => client}/components/ui/toaster.tsx (100%) rename template/app/src/{ => client}/hooks/use-toast.ts (100%) rename template/app/src/client/hooks/{useColorMode.tsx => useColorMode.ts} (100%) rename template/app/src/client/hooks/{useDebounce.tsx => useDebounce.ts} (100%) rename template/app/src/client/hooks/{useIsLandingPage.tsx => useIsLandingPage.ts} (100%) rename template/app/src/client/hooks/{useLocalStorage.tsx => useLocalStorage.ts} (100%) rename template/app/src/{lib => client}/utils.ts (100%) diff --git a/opensaas-sh/app_diff/README.md.diff b/opensaas-sh/app_diff/README.md.diff index fe343f70..7612ff16 100644 --- a/opensaas-sh/app_diff/README.md.diff +++ b/opensaas-sh/app_diff/README.md.diff @@ -1,6 +1,6 @@ --- template/app/README.md +++ opensaas-sh/app/README.md -@@ -1,6 +1,8 @@ +@@ -1,12 +1,27 @@ -# +# opensaas.sh (demo) app @@ -9,10 +9,6 @@ + +It is deployed to https://opensaas.sh and serves both as a landing page for Open Saas and as a demo app. - ## UI Components - -@@ -8,9 +10,22 @@ - ## Development +### .env files diff --git a/opensaas-sh/app_diff/src/client/components/NavBar/NavBar.tsx.diff b/opensaas-sh/app_diff/src/client/components/NavBar/NavBar.tsx.diff index d5621264..af2acebd 100644 --- a/opensaas-sh/app_diff/src/client/components/NavBar/NavBar.tsx.diff +++ b/opensaas-sh/app_diff/src/client/components/NavBar/NavBar.tsx.diff @@ -4,13 +4,13 @@ import { Link as ReactRouterLink } from "react-router-dom"; import { useAuth } from "wasp/client/auth"; import { Link as WaspRouterLink, routes } from "wasp/client/router"; -+import { Button } from "../../../components/ui/button"; ++import { Button } from "../../../client/components/ui/button"; import { Sheet, SheetContent, @@ -17,6 +18,7 @@ - import { useIsLandingPage } from "../../hooks/useIsLandingPage"; import logo from "../../static/logo.webp"; + import { cn } from "../../utils"; import DarkModeSwitcher from "../DarkModeSwitcher"; +import RepoInfo from "../RepoInfo"; import { Announcement } from "./Announcement"; diff --git a/opensaas-sh/app_diff/src/client/components/RepoInfo.tsx.diff b/opensaas-sh/app_diff/src/client/components/RepoInfo.tsx.diff index cd70343d..20716848 100644 --- a/opensaas-sh/app_diff/src/client/components/RepoInfo.tsx.diff +++ b/opensaas-sh/app_diff/src/client/components/RepoInfo.tsx.diff @@ -3,8 +3,8 @@ @@ -0,0 +1,48 @@ +import { useEffect, useState } from "react"; +import { FaGithub } from "react-icons/fa"; -+import { Button } from "../../components/ui/button"; -+import { formatNumber } from "../../lib/utils"; ++import { Button } from "../../client/components/ui/button"; ++import { formatNumber } from "../utils"; + +const RepoInfo = () => { + const [repoInfo, setRepoInfo] = useState(null); diff --git a/opensaas-sh/app_diff/src/components/ui/button.tsx.diff b/opensaas-sh/app_diff/src/client/components/ui/button.tsx.diff similarity index 60% rename from opensaas-sh/app_diff/src/components/ui/button.tsx.diff rename to opensaas-sh/app_diff/src/client/components/ui/button.tsx.diff index 5b7b20d1..e3afc767 100644 --- a/opensaas-sh/app_diff/src/components/ui/button.tsx.diff +++ b/opensaas-sh/app_diff/src/client/components/ui/button.tsx.diff @@ -1,12 +1,6 @@ ---- template/app/src/components/ui/button.tsx -+++ opensaas-sh/app/src/components/ui/button.tsx -@@ -5,26 +5,31 @@ - import { cn } from "../../lib/utils"; - - const buttonVariants = cva( -- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", -+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", - { +--- template/app/src/client/components/ui/button.tsx ++++ opensaas-sh/app/src/client/components/ui/button.tsx +@@ -10,21 +10,26 @@ variants: { variant: { default: diff --git a/opensaas-sh/app_diff/src/components/ui/card.tsx.diff b/opensaas-sh/app_diff/src/client/components/ui/card.tsx.diff similarity index 87% rename from opensaas-sh/app_diff/src/components/ui/card.tsx.diff rename to opensaas-sh/app_diff/src/client/components/ui/card.tsx.diff index 6ac41489..9db6ecdc 100644 --- a/opensaas-sh/app_diff/src/components/ui/card.tsx.diff +++ b/opensaas-sh/app_diff/src/client/components/ui/card.tsx.diff @@ -1,5 +1,5 @@ ---- template/app/src/components/ui/card.tsx -+++ opensaas-sh/app/src/components/ui/card.tsx +--- template/app/src/client/components/ui/card.tsx ++++ opensaas-sh/app/src/client/components/ui/card.tsx @@ -12,7 +12,11 @@ accent: "bg-card-accent text-card-accent-foreground hover:scale-[1.02]", faded: "text-card-faded-foreground scale-95 opacity-50", diff --git a/opensaas-sh/app_diff/src/lib/utils.ts.diff b/opensaas-sh/app_diff/src/client/utils.ts.diff similarity index 80% rename from opensaas-sh/app_diff/src/lib/utils.ts.diff rename to opensaas-sh/app_diff/src/client/utils.ts.diff index 52d923a5..e8e0cfd7 100644 --- a/opensaas-sh/app_diff/src/lib/utils.ts.diff +++ b/opensaas-sh/app_diff/src/client/utils.ts.diff @@ -1,5 +1,5 @@ ---- template/app/src/lib/utils.ts -+++ opensaas-sh/app/src/lib/utils.ts +--- template/app/src/client/utils.ts ++++ opensaas-sh/app/src/client/utils.ts @@ -4,3 +4,12 @@ export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); diff --git a/opensaas-sh/app_diff/src/landing-page/components/Examples/Auth.tsx.diff b/opensaas-sh/app_diff/src/landing-page/components/Examples/Auth.tsx.diff index fbb85e4b..f30a0ddc 100644 --- a/opensaas-sh/app_diff/src/landing-page/components/Examples/Auth.tsx.diff +++ b/opensaas-sh/app_diff/src/landing-page/components/Examples/Auth.tsx.diff @@ -3,9 +3,9 @@ @@ -0,0 +1,163 @@ +import { useState } from "react"; +import { FaDiscord, FaGithub, FaGoogle, FaSlack } from "react-icons/fa"; -+import { Button } from "../../../components/ui/button"; -+import { Card, CardContent, CardHeader } from "../../../components/ui/card"; -+import { Input } from "../../../components/ui/input"; ++import { Button } from "../../../client/components/ui/button"; ++import { Card, CardContent, CardHeader } from "../../../client/components/ui/card"; ++import { Input } from "../../../client/components/ui/input"; +import { DocsUrl } from "../../../shared/common"; +import HighlightedFeature from "../HighlightedFeature"; + diff --git a/opensaas-sh/app_diff/src/landing-page/components/Hero/Hero.tsx.diff b/opensaas-sh/app_diff/src/landing-page/components/Hero/Hero.tsx.diff index 7b5c2a90..08afd586 100644 --- a/opensaas-sh/app_diff/src/landing-page/components/Hero/Hero.tsx.diff +++ b/opensaas-sh/app_diff/src/landing-page/components/Hero/Hero.tsx.diff @@ -5,7 +5,7 @@ +import { Link as ReactRouterLink } from "react-router-dom"; +import { useAuth } from "wasp/client/auth"; +import { Link as WaspRouterLink, routes } from "wasp/client/router"; -+import { Button } from "../../../components/ui/button"; ++import { Button } from "../../../client/components/ui/button"; +import { DocsUrl, WaspUrl } from "../../../shared/common"; +import Orbit from "./Orbit"; + diff --git a/opensaas-sh/app_diff/src/landing-page/components/Hero/Orbit.tsx.diff b/opensaas-sh/app_diff/src/landing-page/components/Hero/Orbit.tsx.diff index 4f10a71f..d55e8f3c 100644 --- a/opensaas-sh/app_diff/src/landing-page/components/Hero/Orbit.tsx.diff +++ b/opensaas-sh/app_diff/src/landing-page/components/Hero/Orbit.tsx.diff @@ -9,7 +9,7 @@ +import stripeLogo from "../../../client/static/logos/stripe-light.webp"; +import tailwindLogoDark from "../../../client/static/logos/tailwind-dark.webp"; +import tailwindLogo from "../../../client/static/logos/tailwind-light.webp"; -+import { cn } from "../../../lib/utils"; ++import { cn } from "../../../client/utils"; +import AstroLogo from "../../logos/AstroLogo"; +import OpenAILogo from "../../logos/OpenAILogo"; +import PrismaLogo from "../../logos/PrismaLogo"; diff --git a/opensaas-sh/app_diff/src/payment/paymentProcessor.ts.diff b/opensaas-sh/app_diff/src/payment/paymentProcessor.ts.diff index 2fd85bc2..dc2265a3 100644 --- a/opensaas-sh/app_diff/src/payment/paymentProcessor.ts.diff +++ b/opensaas-sh/app_diff/src/payment/paymentProcessor.ts.diff @@ -1,6 +1,6 @@ --- template/app/src/payment/paymentProcessor.ts +++ opensaas-sh/app/src/payment/paymentProcessor.ts -@@ -28,9 +28,4 @@ +@@ -29,9 +29,4 @@ webhookMiddlewareConfigFn: MiddlewareConfigFn; } diff --git a/opensaas-sh/app_diff/src/payment/stripe/user.ts.diff b/opensaas-sh/app_diff/src/payment/stripe/user.ts.diff index e351ef20..4a0d3d51 100644 --- a/opensaas-sh/app_diff/src/payment/stripe/user.ts.diff +++ b/opensaas-sh/app_diff/src/payment/stripe/user.ts.diff @@ -1,6 +1,6 @@ --- template/app/src/payment/stripe/user.ts +++ opensaas-sh/app/src/payment/stripe/user.ts -@@ -3,7 +3,7 @@ +@@ -4,7 +4,7 @@ import type { SubscriptionStatus } from "../plans"; import { PaymentPlanId } from "../plans"; @@ -9,7 +9,7 @@ userId: User["id"], prismaUserDelegate: PrismaClient["user"], ): Promise { -@@ -12,20 +12,20 @@ +@@ -13,20 +13,20 @@ id: userId, }, select: { @@ -36,7 +36,7 @@ prismaUserDelegate: PrismaClient["user"], ): Promise { return prismaUserDelegate.update({ -@@ -33,7 +33,7 @@ +@@ -34,7 +34,7 @@ id: userId, }, data: { @@ -45,7 +45,7 @@ }, }); } -@@ -54,7 +54,7 @@ +@@ -55,7 +55,7 @@ ): Promise { return userDelegate.update({ where: { @@ -54,7 +54,7 @@ }, data: { datePaid, -@@ -81,7 +81,7 @@ +@@ -82,7 +82,7 @@ ): Promise { return userDelegate.update({ where: { diff --git a/template/app/.cursor/rules/ui-components.mdc b/template/app/.cursor/rules/ui-components.mdc index 2c89d1e3..23e41356 100644 --- a/template/app/.cursor/rules/ui-components.mdc +++ b/template/app/.cursor/rules/ui-components.mdc @@ -2,40 +2,45 @@ description: Describes where the ui components built on top with Shadcn UI exist, how they are customized, and Wasp specific rules concerning how new ShadCN UI components should be installed alwaysApply: false --- -Only ShadCN UI version 2.3.0 should be used with Wasp at the moment. Due to dependency conflicts Wasp cannot be used with Tailwindcss v4, which the newer version of Shadcn depends on. +Due to dependency conflicts Wasp cannot be used with Tailwindcss v4. -Shadcn has already been setup with this project template, so there is no need to install it. All the ShadCN specific components exist in [src/components/ui](../../src/components/ui/) +ShadCN has already been setup with this project template, so there is no need to install it. All the ShadCN specific components exist in [src/client/components/ui](../../src/client/components/ui/) ## Adding a new ShadCN component -### 1. Add a new component + +We will use button as an example. +Same rules apply to any ShadCN component. + +### 1. Add a new component ```bash -npx shadcn@2.3.0 add button +npx shadcn@latest add button ``` -### 2. Adjust the `utils` import in `button.tsx` (for each component you add) +This will generate a button component in `src/client/components/ui/button.tsx`. + +### 2. Adjust the `utils` import in `button.tsx` -There will be a brand new `button.tsx` file in `src/components/ui`. We need to fix some import issues: ```diff import * as React from "react" import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" --import { cn } from "s/lib/utils" -+import { cn } from "../../lib/utils" +-import { cn } from "src/lib/utils" ++import { cn } from "../../utils" ``` -### 3. Use the `Button` component -Now you are ready to use the `Button` component. That's it! -```jsx -import './Main.css' +### 3. Use the `Button` React component +Now you are ready to use the `Button` component. That's it! +```tsx import { Button } from './components/ui/button' -export const MainPage = () => { +function SomePage() { return ( -
+
) } +``` diff --git a/template/app/README.md b/template/app/README.md index e15c8263..b63e8c03 100644 --- a/template/app/README.md +++ b/template/app/README.md @@ -2,10 +2,6 @@ Built with [Wasp](https://wasp.sh), based on the [Open Saas](https://opensaas.sh) template. -## UI Components - -This template includes [ShadCN UI](https://ui.shadcn.com/) v2 for beautiful, accessible React components. See [SHADCN_SETUP.md](./SHADCN_SETUP.md) for details on how to use ShadCN components in your app. - ## Development ### Running locally diff --git a/template/app/components.json b/template/app/components.json index 4ec2fd42..498df4ba 100644 --- a/template/app/components.json +++ b/template/app/components.json @@ -11,11 +11,11 @@ "prefix": "" }, "aliases": { - "components": "src/components", - "utils": "src/lib/utils", - "ui": "src/components/ui", - "lib": "src/lib", - "hooks": "src/hooks" + "lib": "src/client", + "components": "src/client/components", + "ui": "src/client/components/ui", + "utils": "src/client/utils", + "hooks": "src/client/hooks" }, "iconLibrary": "lucide" } diff --git a/template/app/src/admin/dashboards/analytics/AnalyticsDashboardPage.tsx b/template/app/src/admin/dashboards/analytics/AnalyticsDashboardPage.tsx index 0c33529b..e6f42d92 100644 --- a/template/app/src/admin/dashboards/analytics/AnalyticsDashboardPage.tsx +++ b/template/app/src/admin/dashboards/analytics/AnalyticsDashboardPage.tsx @@ -1,6 +1,6 @@ import { type AuthUser } from "wasp/auth"; import { getDailyStats, useQuery } from "wasp/client/operations"; -import { cn } from "../../../lib/utils"; +import { cn } from "../../../client/utils"; import DefaultLayout from "../../layout/DefaultLayout"; import RevenueAndProfitChart from "./RevenueAndProfitChart"; import SourcesTable from "./SourcesTable"; diff --git a/template/app/src/admin/dashboards/analytics/TotalPageViewsCard.tsx b/template/app/src/admin/dashboards/analytics/TotalPageViewsCard.tsx index eb0c2cb1..36d48c08 100644 --- a/template/app/src/admin/dashboards/analytics/TotalPageViewsCard.tsx +++ b/template/app/src/admin/dashboards/analytics/TotalPageViewsCard.tsx @@ -1,6 +1,10 @@ import { ArrowDown, ArrowUp, Eye } from "lucide-react"; -import { Card, CardContent, CardHeader } from "../../../components/ui/card"; -import { cn } from "../../../lib/utils"; +import { + Card, + CardContent, + CardHeader, +} from "../../../client/components/ui/card"; +import { cn } from "../../../client/utils"; type PageViewsStats = { totalPageViews: number | undefined; diff --git a/template/app/src/admin/dashboards/analytics/TotalPayingUsersCard.tsx b/template/app/src/admin/dashboards/analytics/TotalPayingUsersCard.tsx index 597cd9f2..e83a6691 100644 --- a/template/app/src/admin/dashboards/analytics/TotalPayingUsersCard.tsx +++ b/template/app/src/admin/dashboards/analytics/TotalPayingUsersCard.tsx @@ -1,8 +1,12 @@ import { ArrowDown, ArrowUp, ShoppingBag } from "lucide-react"; import { useMemo } from "react"; import { type DailyStatsProps } from "../../../analytics/stats"; -import { Card, CardContent, CardHeader } from "../../../components/ui/card"; -import { cn } from "../../../lib/utils"; +import { + Card, + CardContent, + CardHeader, +} from "../../../client/components/ui/card"; +import { cn } from "../../../client/utils"; const TotalPayingUsersCard = ({ dailyStats, isLoading }: DailyStatsProps) => { const isDeltaPositive = useMemo(() => { diff --git a/template/app/src/admin/dashboards/analytics/TotalRevenueCard.tsx b/template/app/src/admin/dashboards/analytics/TotalRevenueCard.tsx index 95ba3d45..f30204b2 100644 --- a/template/app/src/admin/dashboards/analytics/TotalRevenueCard.tsx +++ b/template/app/src/admin/dashboards/analytics/TotalRevenueCard.tsx @@ -1,8 +1,12 @@ import { ArrowDown, ArrowUp, ShoppingCart } from "lucide-react"; import { useMemo } from "react"; import { type DailyStatsProps } from "../../../analytics/stats"; -import { Card, CardContent, CardHeader } from "../../../components/ui/card"; -import { cn } from "../../../lib/utils"; +import { + Card, + CardContent, + CardHeader, +} from "../../../client/components/ui/card"; +import { cn } from "../../../client/utils"; const TotalRevenueCard = ({ dailyStats, diff --git a/template/app/src/admin/dashboards/analytics/TotalSignupsCard.tsx b/template/app/src/admin/dashboards/analytics/TotalSignupsCard.tsx index beef4402..19354f87 100644 --- a/template/app/src/admin/dashboards/analytics/TotalSignupsCard.tsx +++ b/template/app/src/admin/dashboards/analytics/TotalSignupsCard.tsx @@ -1,8 +1,12 @@ import { ArrowUp, UsersRound } from "lucide-react"; import { useMemo } from "react"; import { type DailyStatsProps } from "../../../analytics/stats"; -import { Card, CardContent, CardHeader } from "../../../components/ui/card"; -import { cn } from "../../../lib/utils"; +import { + Card, + CardContent, + CardHeader, +} from "../../../client/components/ui/card"; +import { cn } from "../../../client/utils"; const TotalSignupsCard = ({ dailyStats, isLoading }: DailyStatsProps) => { const isDeltaPositive = useMemo(() => { diff --git a/template/app/src/admin/dashboards/users/DropdownEditDelete.tsx b/template/app/src/admin/dashboards/users/DropdownEditDelete.tsx index c6dacaef..0650d965 100644 --- a/template/app/src/admin/dashboards/users/DropdownEditDelete.tsx +++ b/template/app/src/admin/dashboards/users/DropdownEditDelete.tsx @@ -4,7 +4,7 @@ import { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from "../../../components/ui/dropdown-menu"; +} from "../../../client/components/ui/dropdown-menu"; const DropdownEditDelete = () => { return ( diff --git a/template/app/src/admin/dashboards/users/UsersTable.tsx b/template/app/src/admin/dashboards/users/UsersTable.tsx index 109808ad..9b7d9a22 100644 --- a/template/app/src/admin/dashboards/users/UsersTable.tsx +++ b/template/app/src/admin/dashboards/users/UsersTable.tsx @@ -7,19 +7,19 @@ import { useQuery, } from "wasp/client/operations"; import { type User } from "wasp/entities"; -import useDebounce from "../../../client/hooks/useDebounce"; -import { Button } from "../../../components/ui/button"; -import { Checkbox } from "../../../components/ui/checkbox"; -import { Input } from "../../../components/ui/input"; -import { Label } from "../../../components/ui/label"; +import { Button } from "../../../client/components/ui/button"; +import { Checkbox } from "../../../client/components/ui/checkbox"; +import { Input } from "../../../client/components/ui/input"; +import { Label } from "../../../client/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "../../../components/ui/select"; -import { Switch } from "../../../components/ui/switch"; +} from "../../../client/components/ui/select"; +import { Switch } from "../../../client/components/ui/switch"; +import useDebounce from "../../../client/hooks/useDebounce"; import { SubscriptionStatus } from "../../../payment/plans"; import LoadingSpinner from "../../layout/LoadingSpinner"; import DropdownEditDelete from "./DropdownEditDelete"; diff --git a/template/app/src/admin/elements/settings/SettingsPage.tsx b/template/app/src/admin/elements/settings/SettingsPage.tsx index db2fecc1..b752a896 100644 --- a/template/app/src/admin/elements/settings/SettingsPage.tsx +++ b/template/app/src/admin/elements/settings/SettingsPage.tsx @@ -1,16 +1,16 @@ import { FileText, Mail, Upload, User } from "lucide-react"; import { FormEvent } from "react"; import { type AuthUser } from "wasp/auth"; -import { Button } from "../../../components/ui/button"; +import { Button } from "../../../client/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle, -} from "../../../components/ui/card"; -import { Input } from "../../../components/ui/input"; -import { Label } from "../../../components/ui/label"; -import { Textarea } from "../../../components/ui/textarea"; +} from "../../../client/components/ui/card"; +import { Input } from "../../../client/components/ui/input"; +import { Label } from "../../../client/components/ui/label"; +import { Textarea } from "../../../client/components/ui/textarea"; import Breadcrumb from "../../layout/Breadcrumb"; import DefaultLayout from "../../layout/DefaultLayout"; diff --git a/template/app/src/admin/elements/ui-elements/ButtonsPage.tsx b/template/app/src/admin/elements/ui-elements/ButtonsPage.tsx index 3bf8b64a..4da023c5 100644 --- a/template/app/src/admin/elements/ui-elements/ButtonsPage.tsx +++ b/template/app/src/admin/elements/ui-elements/ButtonsPage.tsx @@ -1,6 +1,6 @@ import { Heart, Plus, Trash2 } from "lucide-react"; import { type AuthUser } from "wasp/auth"; -import { Button } from "../../../components/ui/button"; +import { Button } from "../../../client/components/ui/button"; import Breadcrumb from "../../layout/Breadcrumb"; import DefaultLayout from "../../layout/DefaultLayout"; diff --git a/template/app/src/admin/layout/Header.tsx b/template/app/src/admin/layout/Header.tsx index eeec0b7a..c80c2a02 100644 --- a/template/app/src/admin/layout/Header.tsx +++ b/template/app/src/admin/layout/Header.tsx @@ -1,6 +1,6 @@ import { type AuthUser } from "wasp/auth"; import DarkModeSwitcher from "../../client/components/DarkModeSwitcher"; -import { cn } from "../../lib/utils"; +import { cn } from "../../client/utils"; import { UserDropdown } from "../../user/UserDropdown"; import MessageButton from "../dashboards/messages/MessageButton"; diff --git a/template/app/src/admin/layout/Sidebar.tsx b/template/app/src/admin/layout/Sidebar.tsx index 5d219e46..db884542 100644 --- a/template/app/src/admin/layout/Sidebar.tsx +++ b/template/app/src/admin/layout/Sidebar.tsx @@ -11,7 +11,7 @@ import { import React, { useEffect, useRef, useState } from "react"; import { NavLink, useLocation } from "react-router-dom"; import Logo from "../../client/static/logo.webp"; -import { cn } from "../../lib/utils"; +import { cn } from "../../client/utils"; import SidebarLinkGroup from "./SidebarLinkGroup"; interface SidebarProps { diff --git a/template/app/src/client/App.tsx b/template/app/src/client/App.tsx index 531dd766..7d1cd7cc 100644 --- a/template/app/src/client/App.tsx +++ b/template/app/src/client/App.tsx @@ -1,7 +1,7 @@ import { useEffect, useMemo } from "react"; import { Outlet, useLocation } from "react-router-dom"; import { routes } from "wasp/client/router"; -import { Toaster } from "../components/ui/toaster"; +import { Toaster } from "../client/components/ui/toaster"; import "./Main.css"; import NavBar from "./components/NavBar/NavBar"; import { diff --git a/template/app/src/client/components/DarkModeSwitcher.tsx b/template/app/src/client/components/DarkModeSwitcher.tsx index 6113ea49..bed225b4 100644 --- a/template/app/src/client/components/DarkModeSwitcher.tsx +++ b/template/app/src/client/components/DarkModeSwitcher.tsx @@ -1,7 +1,7 @@ import { Moon, Sun } from "lucide-react"; -import { Label } from "../../components/ui/label"; -import { cn } from "../../lib/utils"; +import { Label } from "../../client/components/ui/label"; import useColorMode from "../hooks/useColorMode"; +import { cn } from "../utils"; const DarkModeSwitcher = () => { const [colorMode, setColorMode] = useColorMode(); diff --git a/template/app/src/client/components/NavBar/NavBar.tsx b/template/app/src/client/components/NavBar/NavBar.tsx index 8af0c527..63b3de1e 100644 --- a/template/app/src/client/components/NavBar/NavBar.tsx +++ b/template/app/src/client/components/NavBar/NavBar.tsx @@ -9,13 +9,13 @@ import { SheetHeader, SheetTitle, SheetTrigger, -} from "../../../components/ui/sheet"; -import { cn } from "../../../lib/utils"; +} from "../../../client/components/ui/sheet"; import { throttleWithTrailingInvocation } from "../../../shared/utils"; import { UserDropdown } from "../../../user/UserDropdown"; import { UserMenuItems } from "../../../user/UserMenuItems"; import { useIsLandingPage } from "../../hooks/useIsLandingPage"; import logo from "../../static/logo.webp"; +import { cn } from "../../utils"; import DarkModeSwitcher from "../DarkModeSwitcher"; import { Announcement } from "./Announcement"; diff --git a/template/app/src/components/ui/accordion.tsx b/template/app/src/client/components/ui/accordion.tsx similarity index 98% rename from template/app/src/components/ui/accordion.tsx rename to template/app/src/client/components/ui/accordion.tsx index 6fa4f647..cb74fea5 100644 --- a/template/app/src/components/ui/accordion.tsx +++ b/template/app/src/client/components/ui/accordion.tsx @@ -2,7 +2,7 @@ import * as AccordionPrimitive from "@radix-ui/react-accordion"; import { ChevronDown } from "lucide-react"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Accordion = AccordionPrimitive.Root; diff --git a/template/app/src/components/ui/alert.tsx b/template/app/src/client/components/ui/alert.tsx similarity index 97% rename from template/app/src/components/ui/alert.tsx rename to template/app/src/client/components/ui/alert.tsx index e1a1d10a..f743d542 100644 --- a/template/app/src/components/ui/alert.tsx +++ b/template/app/src/client/components/ui/alert.tsx @@ -1,7 +1,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const alertVariants = cva( "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", diff --git a/template/app/src/components/ui/avatar.tsx b/template/app/src/client/components/ui/avatar.tsx similarity index 97% rename from template/app/src/components/ui/avatar.tsx rename to template/app/src/client/components/ui/avatar.tsx index 7fa44f31..185bbd0d 100644 --- a/template/app/src/components/ui/avatar.tsx +++ b/template/app/src/client/components/ui/avatar.tsx @@ -1,7 +1,7 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Avatar = React.forwardRef< React.ElementRef, diff --git a/template/app/src/components/ui/button.tsx b/template/app/src/client/components/ui/button.tsx similarity index 85% rename from template/app/src/components/ui/button.tsx rename to template/app/src/client/components/ui/button.tsx index 4b70131b..8ee5619f 100644 --- a/template/app/src/components/ui/button.tsx +++ b/template/app/src/client/components/ui/button.tsx @@ -2,10 +2,10 @@ import { Slot } from "@radix-ui/react-slot"; import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const buttonVariants = cva( - "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { diff --git a/template/app/src/components/ui/card.tsx b/template/app/src/client/components/ui/card.tsx similarity index 98% rename from template/app/src/components/ui/card.tsx rename to template/app/src/client/components/ui/card.tsx index 8da32007..637e47c7 100644 --- a/template/app/src/components/ui/card.tsx +++ b/template/app/src/client/components/ui/card.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { cva, VariantProps } from "class-variance-authority"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const cardVariants = cva( "rounded-xl border shadow hover:shadow-lg transition-all duration-300 xur", diff --git a/template/app/src/components/ui/checkbox.tsx b/template/app/src/client/components/ui/checkbox.tsx similarity index 96% rename from template/app/src/components/ui/checkbox.tsx rename to template/app/src/client/components/ui/checkbox.tsx index 3658843d..87df1e85 100644 --- a/template/app/src/components/ui/checkbox.tsx +++ b/template/app/src/client/components/ui/checkbox.tsx @@ -2,7 +2,7 @@ import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; import { Check } from "lucide-react"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Checkbox = React.forwardRef< React.ElementRef, diff --git a/template/app/src/components/ui/dialog.tsx b/template/app/src/client/components/ui/dialog.tsx similarity index 99% rename from template/app/src/components/ui/dialog.tsx rename to template/app/src/client/components/ui/dialog.tsx index 4130fe37..1cec40a9 100644 --- a/template/app/src/components/ui/dialog.tsx +++ b/template/app/src/client/components/ui/dialog.tsx @@ -2,7 +2,7 @@ import * as DialogPrimitive from "@radix-ui/react-dialog"; import { X } from "lucide-react"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Dialog = DialogPrimitive.Root; diff --git a/template/app/src/components/ui/dropdown-menu.tsx b/template/app/src/client/components/ui/dropdown-menu.tsx similarity index 99% rename from template/app/src/components/ui/dropdown-menu.tsx rename to template/app/src/client/components/ui/dropdown-menu.tsx index c487f7b1..1bba22ac 100644 --- a/template/app/src/components/ui/dropdown-menu.tsx +++ b/template/app/src/client/components/ui/dropdown-menu.tsx @@ -2,7 +2,7 @@ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; import { Check, ChevronRight, Circle } from "lucide-react"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const DropdownMenu = DropdownMenuPrimitive.Root; diff --git a/template/app/src/components/ui/form.tsx b/template/app/src/client/components/ui/form.tsx similarity index 99% rename from template/app/src/components/ui/form.tsx rename to template/app/src/client/components/ui/form.tsx index ffde3246..e213782d 100644 --- a/template/app/src/components/ui/form.tsx +++ b/template/app/src/client/components/ui/form.tsx @@ -10,7 +10,7 @@ import { type FieldValues, } from "react-hook-form"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; import { Label } from "./label"; const Form = FormProvider; diff --git a/template/app/src/components/ui/input.tsx b/template/app/src/client/components/ui/input.tsx similarity index 95% rename from template/app/src/components/ui/input.tsx rename to template/app/src/client/components/ui/input.tsx index 72a3cfc1..caffd7f7 100644 --- a/template/app/src/components/ui/input.tsx +++ b/template/app/src/client/components/ui/input.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Input = React.forwardRef>( ({ className, type, ...props }, ref) => { diff --git a/template/app/src/components/ui/label.tsx b/template/app/src/client/components/ui/label.tsx similarity index 94% rename from template/app/src/components/ui/label.tsx rename to template/app/src/client/components/ui/label.tsx index aac44a81..d67fb31b 100644 --- a/template/app/src/components/ui/label.tsx +++ b/template/app/src/client/components/ui/label.tsx @@ -4,7 +4,7 @@ import * as LabelPrimitive from "@radix-ui/react-label"; import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const labelVariants = cva( "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", diff --git a/template/app/src/components/ui/progress.tsx b/template/app/src/client/components/ui/progress.tsx similarity index 95% rename from template/app/src/components/ui/progress.tsx rename to template/app/src/client/components/ui/progress.tsx index 0be41f24..1c42274f 100644 --- a/template/app/src/components/ui/progress.tsx +++ b/template/app/src/client/components/ui/progress.tsx @@ -1,7 +1,7 @@ import * as ProgressPrimitive from "@radix-ui/react-progress"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Progress = React.forwardRef< React.ElementRef, diff --git a/template/app/src/components/ui/select.tsx b/template/app/src/client/components/ui/select.tsx similarity index 99% rename from template/app/src/components/ui/select.tsx rename to template/app/src/client/components/ui/select.tsx index 18ae0233..7ebef428 100644 --- a/template/app/src/components/ui/select.tsx +++ b/template/app/src/client/components/ui/select.tsx @@ -2,7 +2,7 @@ import * as SelectPrimitive from "@radix-ui/react-select"; import { Check, ChevronDown, ChevronUp } from "lucide-react"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Select = SelectPrimitive.Root; diff --git a/template/app/src/components/ui/separator.tsx b/template/app/src/client/components/ui/separator.tsx similarity index 95% rename from template/app/src/components/ui/separator.tsx rename to template/app/src/client/components/ui/separator.tsx index 94b456e1..33da2a6b 100644 --- a/template/app/src/components/ui/separator.tsx +++ b/template/app/src/client/components/ui/separator.tsx @@ -1,7 +1,7 @@ import * as SeparatorPrimitive from "@radix-ui/react-separator"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Separator = React.forwardRef< React.ElementRef, diff --git a/template/app/src/components/ui/sheet.tsx b/template/app/src/client/components/ui/sheet.tsx similarity index 99% rename from template/app/src/components/ui/sheet.tsx rename to template/app/src/client/components/ui/sheet.tsx index f7f26b76..57e11322 100644 --- a/template/app/src/components/ui/sheet.tsx +++ b/template/app/src/client/components/ui/sheet.tsx @@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import { X } from "lucide-react"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Sheet = SheetPrimitive.Root; diff --git a/template/app/src/components/ui/switch.tsx b/template/app/src/client/components/ui/switch.tsx similarity index 96% rename from template/app/src/components/ui/switch.tsx rename to template/app/src/client/components/ui/switch.tsx index ae2f85ff..20445199 100644 --- a/template/app/src/components/ui/switch.tsx +++ b/template/app/src/client/components/ui/switch.tsx @@ -1,7 +1,7 @@ import * as SwitchPrimitives from "@radix-ui/react-switch"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Switch = React.forwardRef< React.ElementRef, diff --git a/template/app/src/components/ui/textarea.tsx b/template/app/src/client/components/ui/textarea.tsx similarity index 94% rename from template/app/src/components/ui/textarea.tsx rename to template/app/src/client/components/ui/textarea.tsx index 156a86ec..4087f4d5 100644 --- a/template/app/src/components/ui/textarea.tsx +++ b/template/app/src/client/components/ui/textarea.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const Textarea = React.forwardRef< HTMLTextAreaElement, diff --git a/template/app/src/components/ui/toast.tsx b/template/app/src/client/components/ui/toast.tsx similarity index 99% rename from template/app/src/components/ui/toast.tsx rename to template/app/src/client/components/ui/toast.tsx index 2ec97372..74f3e85c 100644 --- a/template/app/src/components/ui/toast.tsx +++ b/template/app/src/client/components/ui/toast.tsx @@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import { X } from "lucide-react"; import * as React from "react"; -import { cn } from "../../lib/utils"; +import { cn } from "../../utils"; const ToastProvider = ToastPrimitives.Provider; diff --git a/template/app/src/components/ui/toaster.tsx b/template/app/src/client/components/ui/toaster.tsx similarity index 100% rename from template/app/src/components/ui/toaster.tsx rename to template/app/src/client/components/ui/toaster.tsx diff --git a/template/app/src/hooks/use-toast.ts b/template/app/src/client/hooks/use-toast.ts similarity index 100% rename from template/app/src/hooks/use-toast.ts rename to template/app/src/client/hooks/use-toast.ts diff --git a/template/app/src/client/hooks/useColorMode.tsx b/template/app/src/client/hooks/useColorMode.ts similarity index 100% rename from template/app/src/client/hooks/useColorMode.tsx rename to template/app/src/client/hooks/useColorMode.ts diff --git a/template/app/src/client/hooks/useDebounce.tsx b/template/app/src/client/hooks/useDebounce.ts similarity index 100% rename from template/app/src/client/hooks/useDebounce.tsx rename to template/app/src/client/hooks/useDebounce.ts diff --git a/template/app/src/client/hooks/useIsLandingPage.tsx b/template/app/src/client/hooks/useIsLandingPage.ts similarity index 100% rename from template/app/src/client/hooks/useIsLandingPage.tsx rename to template/app/src/client/hooks/useIsLandingPage.ts diff --git a/template/app/src/client/hooks/useLocalStorage.tsx b/template/app/src/client/hooks/useLocalStorage.ts similarity index 100% rename from template/app/src/client/hooks/useLocalStorage.tsx rename to template/app/src/client/hooks/useLocalStorage.ts diff --git a/template/app/src/lib/utils.ts b/template/app/src/client/utils.ts similarity index 100% rename from template/app/src/lib/utils.ts rename to template/app/src/client/utils.ts diff --git a/template/app/src/demo-ai-app/DemoAppPage.tsx b/template/app/src/demo-ai-app/DemoAppPage.tsx index f2e6e821..18af5e59 100644 --- a/template/app/src/demo-ai-app/DemoAppPage.tsx +++ b/template/app/src/demo-ai-app/DemoAppPage.tsx @@ -12,19 +12,19 @@ import { Link, routes } from "wasp/client/router"; import { ArrowRight, Loader2, Trash2 } from "lucide-react"; import { useMemo, useState } from "react"; -import { Button } from "../components/ui/button"; +import { Button } from "../client/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle, -} from "../components/ui/card"; -import { Checkbox } from "../components/ui/checkbox"; -import { Input } from "../components/ui/input"; -import { Label } from "../components/ui/label"; -import { ToastAction } from "../components/ui/toast"; -import { toast } from "../hooks/use-toast"; -import { cn } from "../lib/utils"; +} from "../client/components/ui/card"; +import { Checkbox } from "../client/components/ui/checkbox"; +import { Input } from "../client/components/ui/input"; +import { Label } from "../client/components/ui/label"; +import { ToastAction } from "../client/components/ui/toast"; +import { toast } from "../client/hooks/use-toast"; +import { cn } from "../client/utils"; import type { GeneratedSchedule, Task as ScheduleTask, diff --git a/template/app/src/file-upload/FileUploadPage.tsx b/template/app/src/file-upload/FileUploadPage.tsx index e0f4a4c8..0ced8c5d 100644 --- a/template/app/src/file-upload/FileUploadPage.tsx +++ b/template/app/src/file-upload/FileUploadPage.tsx @@ -10,9 +10,9 @@ import { import type { File } from "wasp/entities"; import { Download, Trash } from "lucide-react"; -import { Alert, AlertDescription } from "../components/ui/alert"; -import { Button } from "../components/ui/button"; -import { Card, CardContent, CardTitle } from "../components/ui/card"; +import { Alert, AlertDescription } from "../client/components/ui/alert"; +import { Button } from "../client/components/ui/button"; +import { Card, CardContent, CardTitle } from "../client/components/ui/card"; import { Dialog, DialogContent, @@ -20,12 +20,12 @@ import { DialogFooter, DialogHeader, DialogTitle, -} from "../components/ui/dialog"; -import { Input } from "../components/ui/input"; -import { Label } from "../components/ui/label"; -import { Progress } from "../components/ui/progress"; -import { toast } from "../hooks/use-toast"; -import { cn } from "../lib/utils"; +} from "../client/components/ui/dialog"; +import { Input } from "../client/components/ui/input"; +import { Label } from "../client/components/ui/label"; +import { Progress } from "../client/components/ui/progress"; +import { toast } from "../client/hooks/use-toast"; +import { cn } from "../client/utils"; import { uploadFileWithProgress, validateFile } from "./fileUploading"; import { ALLOWED_FILE_TYPES } from "./validation"; diff --git a/template/app/src/landing-page/components/ExamplesCarousel.tsx b/template/app/src/landing-page/components/ExamplesCarousel.tsx index cefba1d6..7cb0940f 100644 --- a/template/app/src/landing-page/components/ExamplesCarousel.tsx +++ b/template/app/src/landing-page/components/ExamplesCarousel.tsx @@ -1,5 +1,5 @@ import { forwardRef, useEffect, useRef, useState } from "react"; -import { Card, CardContent } from "../../components/ui/card"; +import { Card, CardContent } from "../../client/components/ui/card"; const EXAMPLES_CAROUSEL_INTERVAL = 3000; const EXAMPLES_CAROUSEL_SCROLL_TIMEOUT = 200; diff --git a/template/app/src/landing-page/components/FAQ.tsx b/template/app/src/landing-page/components/FAQ.tsx index c230c059..c5786267 100644 --- a/template/app/src/landing-page/components/FAQ.tsx +++ b/template/app/src/landing-page/components/FAQ.tsx @@ -3,7 +3,7 @@ import { AccordionContent, AccordionItem, AccordionTrigger, -} from "../../components/ui/accordion"; +} from "../../client/components/ui/accordion"; interface FAQ { id: number; diff --git a/template/app/src/landing-page/components/FeaturesGrid.tsx b/template/app/src/landing-page/components/FeaturesGrid.tsx index a780388d..3bd284e0 100644 --- a/template/app/src/landing-page/components/FeaturesGrid.tsx +++ b/template/app/src/landing-page/components/FeaturesGrid.tsx @@ -4,8 +4,8 @@ import { CardContent, CardDescription, CardTitle, -} from "../../components/ui/card"; -import { cn } from "../../lib/utils"; +} from "../../client/components/ui/card"; +import { cn } from "../../client/utils"; import { Feature } from "./Features"; import SectionTitle from "./SectionTitle"; diff --git a/template/app/src/landing-page/components/Hero.tsx b/template/app/src/landing-page/components/Hero.tsx index 17409488..c96000a6 100644 --- a/template/app/src/landing-page/components/Hero.tsx +++ b/template/app/src/landing-page/components/Hero.tsx @@ -1,7 +1,7 @@ import { Link as WaspRouterLink, routes } from "wasp/client/router"; +import { Button } from "../../client/components/ui/button"; import openSaasBannerDark from "../../client/static/open-saas-banner-dark.svg"; import openSaasBannerLight from "../../client/static/open-saas-banner-light.svg"; -import { Button } from "../../components/ui/button"; export default function Hero() { return ( diff --git a/template/app/src/landing-page/components/HighlightedFeature.tsx b/template/app/src/landing-page/components/HighlightedFeature.tsx index dbb119ae..77cfb050 100644 --- a/template/app/src/landing-page/components/HighlightedFeature.tsx +++ b/template/app/src/landing-page/components/HighlightedFeature.tsx @@ -1,4 +1,4 @@ -import { cn } from "../../lib/utils"; +import { cn } from "../../client/utils"; interface FeatureProps { name: string; diff --git a/template/app/src/landing-page/components/Testimonials.tsx b/template/app/src/landing-page/components/Testimonials.tsx index 10d1396a..06c210b6 100644 --- a/template/app/src/landing-page/components/Testimonials.tsx +++ b/template/app/src/landing-page/components/Testimonials.tsx @@ -5,7 +5,7 @@ import { CardDescription, CardFooter, CardTitle, -} from "../../components/ui/card"; +} from "../../client/components/ui/card"; import SectionTitle from "./SectionTitle"; interface Testimonial { diff --git a/template/app/src/payment/PricingPage.tsx b/template/app/src/payment/PricingPage.tsx index 4633a266..a12c06db 100644 --- a/template/app/src/payment/PricingPage.tsx +++ b/template/app/src/payment/PricingPage.tsx @@ -7,15 +7,15 @@ import { getCustomerPortalUrl, useQuery, } from "wasp/client/operations"; -import { Alert, AlertDescription } from "../components/ui/alert"; -import { Button } from "../components/ui/button"; +import { Alert, AlertDescription } from "../client/components/ui/alert"; +import { Button } from "../client/components/ui/button"; import { Card, CardContent, CardFooter, CardTitle, -} from "../components/ui/card"; -import { cn } from "../lib/utils"; +} from "../client/components/ui/card"; +import { cn } from "../client/utils"; import { PaymentPlanId, paymentPlans, diff --git a/template/app/src/payment/stripe/webhook.ts b/template/app/src/payment/stripe/webhook.ts index 44d1924d..d0a7cd40 100644 --- a/template/app/src/payment/stripe/webhook.ts +++ b/template/app/src/payment/stripe/webhook.ts @@ -141,7 +141,7 @@ async function handleInvoicePaid( function getInvoicePriceId(invoice: Stripe.Invoice): Stripe.Price["id"] { const invoiceLineItems = invoice.lines.data; - // We only expect one line item. + // We only expect one line item. // If your workflow expects more, you should change this function to handle them. if (invoiceLineItems.length !== 1) { throw new Error("There should be exactly one line item in Stripe invoice"); @@ -204,7 +204,7 @@ function getSubscriptionPriceId( subscription: Stripe.Subscription, ): Stripe.Price["id"] { const subscriptionItems = subscription.items.data; - // We only expect one subscription item. + // We only expect one subscription item. // If your workflow expects more, you should change this function to handle them. if (subscriptionItems.length !== 1) { throw new Error( diff --git a/template/app/src/user/AccountPage.tsx b/template/app/src/user/AccountPage.tsx index c0617bc2..a0482587 100644 --- a/template/app/src/user/AccountPage.tsx +++ b/template/app/src/user/AccountPage.tsx @@ -1,14 +1,14 @@ import { getCustomerPortalUrl, useQuery } from "wasp/client/operations"; import { Link as WaspRouterLink, routes } from "wasp/client/router"; import type { User } from "wasp/entities"; -import { Button } from "../components/ui/button"; +import { Button } from "../client/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle, -} from "../components/ui/card"; -import { Separator } from "../components/ui/separator"; +} from "../client/components/ui/card"; +import { Separator } from "../client/components/ui/separator"; import { PaymentPlanId, SubscriptionStatus, diff --git a/template/app/src/user/UserDropdown.tsx b/template/app/src/user/UserDropdown.tsx index 09c8069b..0f1b49c4 100644 --- a/template/app/src/user/UserDropdown.tsx +++ b/template/app/src/user/UserDropdown.tsx @@ -8,7 +8,7 @@ import { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from "../components/ui/dropdown-menu"; +} from "../client/components/ui/dropdown-menu"; import { userMenuItems } from "./constants"; export function UserDropdown({ user }: { user: Partial }) {