mirror of
https://github.com/shadcn-ui/taxonomy
synced 2026-05-24 09:48:32 +00:00
refactor: move ui out of components
This commit is contained in:
parent
59e5bf7a28
commit
b918c0aa35
20 changed files with 17 additions and 16 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Skeleton } from "@/components/ui/skeleton"
|
||||
import { Skeleton } from "@/ui/skeleton"
|
||||
|
||||
export default function Loading() {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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<Post, "id" | "title" | "content" | "published">
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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<Pick<Post, "id">> {
|
||||
const response = await fetch("/api/posts", {
|
||||
|
|
|
|||
|
|
@ -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<Post, "id" | "title" | "published" | "createdAt">
|
||||
|
|
|
|||
|
|
@ -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}`, {
|
||||
|
|
|
|||
|
|
@ -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<HTMLDivElement> {
|
||||
|
|
|
|||
|
|
@ -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<HTMLDivElement> {}
|
||||
|
|
|
|||
|
|
@ -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<User, "image" | "name">
|
||||
|
|
|
|||
|
|
@ -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<HTMLFormElement> {
|
||||
user: Pick<User, "id" | "name">
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/components/*": ["components/*"],
|
||||
"@/ui/*": ["ui/*"],
|
||||
"@/lib/*": ["lib/*"],
|
||||
"@/styles/*": ["styles/*"],
|
||||
"@/prisma/*": ["prisma/*"]
|
||||
|
|
|
|||
|
|
@ -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<HTMLDivElement> {}
|
||||
|
||||
Loading…
Reference in a new issue