From 24a492fae4b96d3c60289ff2b89caa13334ac411 Mon Sep 17 00:00:00 2001 From: Udoh Jeremiah Date: Tue, 2 Apr 2024 23:57:43 +0100 Subject: [PATCH] Refactor website code and components. --- .../billboards/[billboardId]/page.tsx | 2 +- .../categories/[categoryId]/page.tsx | 2 +- .../[storeId]/colors/[colorId]/page.tsx | 8 +- src/app/(dashboard)/[storeId]/layout.tsx | 13 +- .../[storeId]/products/[productId]/page.tsx | 2 +- .../[storeId]/sizes/[sizeId]/page.tsx | 2 +- src/app/(root)/layout.tsx | 7 +- src/app/(root)/page.tsx | 2 +- src/components/StoreSwitcher.tsx | 122 +++++++++--------- src/components/columns/BillboardColumns.tsx | 93 +++++++------ src/components/columns/CategoryColumns.tsx | 93 +++++++------ src/components/columns/ColorColumns.tsx | 93 +++++++------ src/components/columns/ProductColumns.tsx | 91 +++++++------ src/components/columns/SizeColumns.tsx | 93 +++++++------ src/components/dialogs/CreateStoreDialog.tsx | 30 +++-- .../dialogs/DeleteBillboardDialog.tsx | 56 ++++---- .../dialogs/DeleteCategoryDialog.tsx | 58 ++++----- src/components/dialogs/DeleteColorDialog.tsx | 56 ++++---- .../dialogs/DeleteProductDialog.tsx | 56 ++++---- src/components/dialogs/DeleteSizeDialog.tsx | 56 ++++---- src/components/dialogs/DeleteStoreDialog.tsx | 17 ++- src/hooks/use-create-store.ts | 9 -- src/providers/CreateStoreProvider.tsx | 29 ----- 23 files changed, 508 insertions(+), 482 deletions(-) delete mode 100644 src/hooks/use-create-store.ts delete mode 100644 src/providers/CreateStoreProvider.tsx diff --git a/src/app/(dashboard)/[storeId]/billboards/[billboardId]/page.tsx b/src/app/(dashboard)/[storeId]/billboards/[billboardId]/page.tsx index 0fb5e49..8d32c82 100644 --- a/src/app/(dashboard)/[storeId]/billboards/[billboardId]/page.tsx +++ b/src/app/(dashboard)/[storeId]/billboards/[billboardId]/page.tsx @@ -80,12 +80,12 @@ export default async function BillboardPage({ params }: BillboardPageProps) { description={`Manage this billboard for your ${store?.name} store.`} /> diff --git a/src/app/(dashboard)/[storeId]/categories/[categoryId]/page.tsx b/src/app/(dashboard)/[storeId]/categories/[categoryId]/page.tsx index 6fbca39..2710850 100644 --- a/src/app/(dashboard)/[storeId]/categories/[categoryId]/page.tsx +++ b/src/app/(dashboard)/[storeId]/categories/[categoryId]/page.tsx @@ -89,13 +89,13 @@ export default async function CategoryPage({ params }: CategoryPageProps) { description={`Manage the ${category.name} category for your ${store?.name} store.`} /> diff --git a/src/app/(dashboard)/[storeId]/colors/[colorId]/page.tsx b/src/app/(dashboard)/[storeId]/colors/[colorId]/page.tsx index a30b8ed..36c4586 100644 --- a/src/app/(dashboard)/[storeId]/colors/[colorId]/page.tsx +++ b/src/app/(dashboard)/[storeId]/colors/[colorId]/page.tsx @@ -80,23 +80,23 @@ export default async function ColorPage({ params }: ColorPageProps) { )} > - + - -
- {children} -