Skip to content

Commit

Permalink
feat: update data-table
Browse files Browse the repository at this point in the history
  • Loading branch information
sadmann7 committed Mar 9, 2024
1 parent 23f0ea8 commit 7b4028a
Show file tree
Hide file tree
Showing 63 changed files with 507 additions and 363 deletions.
2 changes: 1 addition & 1 deletion src/app/(auth)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"
import { OAuthSignIn } from "@/app/(auth)/_components/oauth-signin"
import { SignInForm } from "@/app/(auth)/_components/signin-form"

Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/signin/reset-password/confirm/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"
import { ResetPasswordConfirmForm } from "@/app/(auth)/_components/reset-password-confirm-form"

export const metadata: Metadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/signin/reset-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"
import { ResetPasswordForm } from "@/app/(auth)/_components/reset-password-form"

export const metadata: Metadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/signout/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function SignOutLoading() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/signout/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"
import { LogOutButtons } from "@/app/(auth)/_components/logout-buttons"

export const metadata: Metadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"
import { OAuthSignIn } from "@/app/(auth)/_components/oauth-signin"
import { SignUpForm } from "@/app/(auth)/_components/signup-form"

Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/signup/verify-email/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"
import { VerifyEmailForm } from "@/app/(auth)/_components/verify-email-form"

export const metadata: Metadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/sso-callback/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type HandleOAuthCallbackParams } from "@clerk/types"

import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"
import { SSOCallback } from "@/app/(auth)/_components/sso-callback"

export interface SSOCallbackPageProps {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(checkout)/cart/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function CartLoading() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/(checkout)/cart/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
Expand Down
2 changes: 1 addition & 1 deletion src/app/(checkout)/checkout/[storeId]/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as React from "react"

import { ErrorCard } from "@/components/cards/error-card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function StoreCheckoutError({
error,
Expand Down
2 changes: 1 addition & 1 deletion src/app/(checkout)/checkout/[storeId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Separator } from "@/components/ui/separator"
import { CartLineItems } from "@/components/checkout/cart-line-items"
import { CheckoutForm } from "@/components/checkout/checkout-form"
import { CheckoutShell } from "@/components/checkout/checkout-shell"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/app/(dashboard)/dashboard/account/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function AccountLoading() {
return (
<Shell variant="sidebar">
<PageHeader separated>
<PageHeader>
<PageHeaderHeading size="sm">Account</PageHeaderHeading>
<PageHeaderDescription size="sm">
Manage your account settings
Expand Down
17 changes: 5 additions & 12 deletions src/app/(dashboard)/dashboard/account/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import type { Metadata } from "next"
import { env } from "@/env.js"

import { UserProfile } from "@/components/auth/user-profile"
import {
PageHeader,
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

import { UserProfile } from "./_components/user-profile"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
Expand All @@ -18,21 +19,13 @@ export const metadata: Metadata = {
export default function AccountPage() {
return (
<Shell variant="sidebar">
<PageHeader
id="account-header"
aria-labelledby="account-header-heading"
separated
>
<PageHeader>
<PageHeaderHeading size="sm">Account</PageHeaderHeading>
<PageHeaderDescription size="sm">
Manage your account settings
</PageHeaderDescription>
</PageHeader>
<section
id="user-account-info"
aria-labelledby="user-account-info-heading"
className="w-full overflow-hidden"
>
<section className="w-full overflow-hidden">
<UserProfile />
</section>
</Shell>
Expand Down
8 changes: 4 additions & 4 deletions src/app/(dashboard)/dashboard/billing/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

import { Billing } from "./_components/billing"
import { BillingSkeleton } from "./_components/billing-skeleton"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
title: "Billing",
description: "Manage your billing and subscription",
description: "Manage your billing and subscription plan",
}

export default async function BillingPage() {
Expand All @@ -40,7 +40,7 @@ export default async function BillingPage() {
<PageHeader>
<PageHeaderHeading size="sm">Billing</PageHeaderHeading>
<PageHeaderDescription size="sm">
Manage your billing and subscription
Manage your billing and subscription plan
</PageHeaderDescription>
</PageHeader>
<Alert>
Expand All @@ -53,7 +53,7 @@ export default async function BillingPage() {
href="https://stripe.com/docs/testing"
target="_blank"
rel="noopener noreferrer"
className="font-medium underline underline-offset-4 transition-colors hover:text-foreground/90"
className="font-medium underline underline-offset-4 transition-colors hover:text-foreground/80"
>
Stripe docs
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Card, CardContent, CardHeader } from "@/components/ui/card"
import { Skeleton } from "@/components/ui/skeleton"
import { PageHeader } from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function PurchaseLoading() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard/purchases/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shell"
import { PurchasesTableShell } from "@/components/shells/purchases-table-shell"
import { Shell } from "@/components/shells/shell"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard/stores/[storeId]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from "@/components/page-header"
import { StoreSwitcher } from "@/components/pagers/store-switcher"
import { StoreTabs } from "@/components/pagers/store-tabs"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

interface StoreLayoutProps extends React.PropsWithChildren {
params: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ErrorCard } from "@/components/cards/error-card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function StoreNotFound() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ErrorCard } from "@/components/cards/error-card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

interface ProductNotFoundProps {
params: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard/stores/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"
import { StoreCardSkeleton } from "@/components/skeletons/store-card-skeleton"

import { AddStoreDialog } from "./_components/add-store-dialog"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type UseChatHelpers } from "ai/react"

import { Button } from "@/components/ui/button"
import { Card } from "@/components/ui/card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

const examples = [
"Get me the top 5 stories on Hacker News in markdown table format. Use columns like title, link, score, and comments.",
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/(helps)/[...slug]/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ErrorCard } from "@/components/cards/error-card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function PageNotFound() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/(helps)/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
PageHeaderHeading,
} from "@/components/page-header"
import { MdxPager } from "@/components/pagers/mdx-pager"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

interface PageProps {
params: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/blog/[...slug]/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "@/styles/mdx.css"
import { AspectRatio } from "@/components/ui/aspect-ratio"
import { Separator } from "@/components/ui/separator"
import { Skeleton } from "@/components/ui/skeleton"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function PostLoading() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/blog/[...slug]/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ErrorCard } from "@/components/cards/error-card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function BlogNotFound() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/blog/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { AspectRatio } from "@/components/ui/aspect-ratio"
import { buttonVariants } from "@/components/ui/button"
import { Separator } from "@/components/ui/separator"
import { MdxPager } from "@/components/pagers/mdx-pager"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

interface PostPageProps {
params: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

import { PostCard } from "./_components/post-card"
import { PostCardSkeleton } from "./_components/post-card-skeleton"
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/notifications/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from "@/components/ui/card"
import { Skeleton } from "@/components/ui/skeleton"
import { PageHeader } from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function EmailPreferencesLoading() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/notifications/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ErrorCard } from "@/components/cards/error-card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function EmailPreferencesNotFound() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/(lobby)/(content)/notifications/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "@/components/ui/card"
import { UpdateNotificationForm } from "@/components/forms/update-notification-form"
import { PageHeader } from "@/components/page-header"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export const metadata: Metadata = {
metadataBase: new URL(env.NEXT_PUBLIC_APP_URL),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cn } from "@/lib/utils"
import { Skeleton } from "@/components/ui/skeleton"
import { DialogShell } from "@/components/dialog-shell"
import { PlaceholderImage } from "@/components/placeholder-image"
import { DialogShell } from "@/components/shells/dialog-shell"

export default function ProductModalLoading() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ErrorCard } from "@/components/cards/error-card"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

export default function ProductModalNotFound() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { cn, formatPrice } from "@/lib/utils"
import { AlertDialogAction } from "@/components/ui/alert-dialog"
import { AspectRatio } from "@/components/ui/aspect-ratio"
import { buttonVariants } from "@/components/ui/button"
import { DialogShell } from "@/components/dialog-shell"
import { PlaceholderImage } from "@/components/placeholder-image"
import { Rating } from "@/components/rating"
import { DialogShell } from "@/components/shells/dialog-shell"

interface ProductModalPageProps {
params: {
Expand Down
4 changes: 2 additions & 2 deletions src/app/(lobby)/_components/lobby-skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Link from "next/link"

import { Button } from "@/components/ui/button"
import { Skeleton } from "@/components/ui/skeleton"
import { ContentSection } from "@/components/shells/content-section"
import { Shell } from "@/components/shells/shell"
import { ContentSection } from "@/components/content-section"
import { Shell } from "@/components/shell"
import { ProductCardSkeleton } from "@/components/skeletons/product-card-skeleton"
import { StoreCardSkeleton } from "@/components/skeletons/store-card-skeleton"

Expand Down
4 changes: 2 additions & 2 deletions src/app/(lobby)/_components/lobby.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
import { ProductCard } from "@/components/cards/product-card"
import { StoreCard } from "@/components/cards/store-card"
import { ContentSection } from "@/components/content-section"
import { Icons } from "@/components/icons"
import { ContentSection } from "@/components/shells/content-section"
import { Shell } from "@/components/shells/shell"
import { Shell } from "@/components/shell"

import { CategoryCard } from "./category-card"

Expand Down
Loading

0 comments on commit 7b4028a

Please sign in to comment.