diff --git a/app/(dashboard)/dashboard/settings/loading.tsx b/app/(dashboard)/dashboard/settings/loading.tsx index 911d27b..361d5fc 100644 --- a/app/(dashboard)/dashboard/settings/loading.tsx +++ b/app/(dashboard)/dashboard/settings/loading.tsx @@ -1,6 +1,6 @@ import { DashboardHeader } from "@/components/dashboard-header" import { DashboardShell } from "@/components/dashboard-shell" -import { Card } from "@/components/ui/card" +import { Card } from "@/ui/card" export default function DashboardSettingsLoading() { return ( diff --git a/app/(editor)/editor/[postId]/loading.tsx b/app/(editor)/editor/[postId]/loading.tsx index 901e37d..aa288b0 100644 --- a/app/(editor)/editor/[postId]/loading.tsx +++ b/app/(editor)/editor/[postId]/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@/components/ui/skeleton" +import { Skeleton } from "@/ui/skeleton" export default function Loading() { return ( diff --git a/app/layout.tsx b/app/layout.tsx index b464a4a..b234922 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,6 +1,6 @@ import "styles/globals.css" -import { Toaster } from "@/components/ui/toast" +import { Toaster } from "@/ui/toast" import { Help } from "@/components/help" import { Analytics } from "@/components/analytics" diff --git a/components/editor.tsx b/components/editor.tsx index 74a52d1..718b67e 100644 --- a/components/editor.tsx +++ b/components/editor.tsx @@ -12,7 +12,7 @@ import { useRouter } from "next/navigation" import { Icons } from "@/components/icons" import { postPatchSchema } from "@/lib/validations/post" -import toast from "@/components/ui/toast" +import toast from "@/ui/toast" interface EditorProps { post: Pick diff --git a/components/help.tsx b/components/help.tsx index 3c6bc93..cec9d63 100644 --- a/components/help.tsx +++ b/components/help.tsx @@ -1,6 +1,6 @@ "use client" -import { Popover } from "@/components/ui/popover" +import { Popover } from "@/ui/popover" import { Icons } from "@/components/icons" import OgImage from "public/og.jpg" diff --git a/components/post-create-button.tsx b/components/post-create-button.tsx index 15ae49a..2d8822a 100644 --- a/components/post-create-button.tsx +++ b/components/post-create-button.tsx @@ -6,7 +6,7 @@ import { Post } from "@/lib/prisma" import { cn } from "@/lib/utils" import { Icons } from "@/components/icons" -import toast from "@/components/ui/toast" +import toast from "@/ui/toast" async function createPost(): Promise> { const response = await fetch("/api/posts", { diff --git a/components/post-item.tsx b/components/post-item.tsx index 0402f27..e3781c6 100644 --- a/components/post-item.tsx +++ b/components/post-item.tsx @@ -3,7 +3,7 @@ import Link from "next/link" import { formatDate } from "@/lib/utils" import { PostOperations } from "@/components/post-operations" -import { Skeleton } from "@/components/ui/skeleton" +import { Skeleton } from "@/ui/skeleton" interface PostItemProps { post: Pick diff --git a/components/post-operations.tsx b/components/post-operations.tsx index 3a4224f..2b25e1b 100644 --- a/components/post-operations.tsx +++ b/components/post-operations.tsx @@ -5,10 +5,10 @@ import Link from "next/link" import { useRouter } from "next/navigation" import { Post } from "@/lib/prisma" -import { DropdownMenu } from "@/components/ui/dropdown" +import { DropdownMenu } from "@/ui/dropdown" import { Icons } from "@/components/icons" -import { Alert } from "@/components/ui/alert" -import toast from "@/components/ui/toast" +import { Alert } from "@/ui/alert" +import toast from "@/ui/toast" async function deletePost(postId: string) { const response = await fetch(`/api/posts/${postId}`, { diff --git a/components/user-account-nav.tsx b/components/user-account-nav.tsx index 0ab4962..6889f6d 100644 --- a/components/user-account-nav.tsx +++ b/components/user-account-nav.tsx @@ -4,7 +4,7 @@ import { User } from "next-auth" import { signOut } from "next-auth/react" import Link from "next/link" -import { DropdownMenu } from "@/components/ui/dropdown" +import { DropdownMenu } from "@/ui/dropdown" import { UserAvatar } from "@/components/user-avatar" interface UserAccountNavProps extends React.HTMLAttributes { diff --git a/components/user-auth-form.tsx b/components/user-auth-form.tsx index d2a05b7..7ccff79 100644 --- a/components/user-auth-form.tsx +++ b/components/user-auth-form.tsx @@ -8,7 +8,7 @@ import { zodResolver } from "@hookform/resolvers/zod" import { cn } from "@/lib/utils" import { userAuthSchema } from "@/lib/validations/auth" -import toast from "@/components/ui/toast" +import toast from "@/ui/toast" import { Icons } from "@/components/icons" interface UserAuthFormProps extends React.HTMLAttributes {} diff --git a/components/user-avatar.tsx b/components/user-avatar.tsx index d2154de..fa1c267 100644 --- a/components/user-avatar.tsx +++ b/components/user-avatar.tsx @@ -2,7 +2,7 @@ import { User } from "@/lib/prisma" import { AvatarProps } from "@radix-ui/react-avatar" import { Icons } from "@/components/icons" -import { Avatar } from "@/components/ui/avatar" +import { Avatar } from "@/ui/avatar" interface UserAvatarProps extends AvatarProps { user: Pick diff --git a/components/user-name-form.tsx b/components/user-name-form.tsx index e807fd6..a615be7 100644 --- a/components/user-name-form.tsx +++ b/components/user-name-form.tsx @@ -9,9 +9,9 @@ import { useRouter } from "next/navigation" import { cn } from "@/lib/utils" import { userNameSchema } from "@/lib/validations/user" -import { Card } from "@/components/ui/card" +import { Card } from "@/ui/card" import { Icons } from "@/components/icons" -import toast from "@/components/ui/toast" +import toast from "@/ui/toast" interface UserNameFormProps extends React.HTMLAttributes { user: Pick diff --git a/tsconfig.json b/tsconfig.json index 656abf2..7849214 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,6 +17,7 @@ "baseUrl": ".", "paths": { "@/components/*": ["components/*"], + "@/ui/*": ["ui/*"], "@/lib/*": ["lib/*"], "@/styles/*": ["styles/*"], "@/prisma/*": ["prisma/*"] diff --git a/components/ui/alert.tsx b/ui/alert.tsx similarity index 100% rename from components/ui/alert.tsx rename to ui/alert.tsx diff --git a/components/ui/avatar.tsx b/ui/avatar.tsx similarity index 100% rename from components/ui/avatar.tsx rename to ui/avatar.tsx diff --git a/components/ui/card.tsx b/ui/card.tsx similarity index 97% rename from components/ui/card.tsx rename to ui/card.tsx index 43164c7..6c975d6 100644 --- a/components/ui/card.tsx +++ b/ui/card.tsx @@ -1,5 +1,5 @@ import { cn } from "@/lib/utils" -import { Skeleton } from "@/components/ui/skeleton" +import { Skeleton } from "@/ui/skeleton" interface CardProps extends React.HTMLAttributes {} diff --git a/components/ui/dropdown.tsx b/ui/dropdown.tsx similarity index 100% rename from components/ui/dropdown.tsx rename to ui/dropdown.tsx diff --git a/components/ui/popover.tsx b/ui/popover.tsx similarity index 100% rename from components/ui/popover.tsx rename to ui/popover.tsx diff --git a/components/ui/skeleton.tsx b/ui/skeleton.tsx similarity index 100% rename from components/ui/skeleton.tsx rename to ui/skeleton.tsx diff --git a/components/ui/toast.tsx b/ui/toast.tsx similarity index 100% rename from components/ui/toast.tsx rename to ui/toast.tsx