From 75d73b0f49ed5ef8c41679c8c10cb652df5ffddc Mon Sep 17 00:00:00 2001 From: Pahan Sarathchandra Date: Sun, 19 May 2024 16:45:38 +0300 Subject: [PATCH] Rename EditPost component --- src/app/admin/page.tsx | 4 ++-- src/app/components/EditPost/index.ts | 0 .../EditPost.stories.tsx => edit-post/edit-post.stories.tsx} | 2 +- .../{EditPost/EditPost.tsx => edit-post/edit-post.tsx} | 0 src/app/components/edit-post/index.ts | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 src/app/components/EditPost/index.ts rename src/app/components/{EditPost/EditPost.stories.tsx => edit-post/edit-post.stories.tsx} (86%) rename src/app/components/{EditPost/EditPost.tsx => edit-post/edit-post.tsx} (100%) create mode 100644 src/app/components/edit-post/index.ts diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index 379b12e..446e273 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -1,5 +1,5 @@ -import { EditPost } from "../components/EditPost/EditPost"; -import { fetchAllPosts, fetchPost } from "../lib/data"; +import { EditPost } from "@/app/components/edit-post"; +import { fetchAllPosts, fetchPost } from "@/app/lib/data"; import { PostsTable } from "./posts-table"; interface AdminPageProps { diff --git a/src/app/components/EditPost/index.ts b/src/app/components/EditPost/index.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/EditPost/EditPost.stories.tsx b/src/app/components/edit-post/edit-post.stories.tsx similarity index 86% rename from src/app/components/EditPost/EditPost.stories.tsx rename to src/app/components/edit-post/edit-post.stories.tsx index d90b94e..fc0f982 100644 --- a/src/app/components/EditPost/EditPost.stories.tsx +++ b/src/app/components/edit-post/edit-post.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { EditPost } from "./EditPost"; +import { EditPost } from "./edit-post"; const meta = { title: "EditPost", diff --git a/src/app/components/EditPost/EditPost.tsx b/src/app/components/edit-post/edit-post.tsx similarity index 100% rename from src/app/components/EditPost/EditPost.tsx rename to src/app/components/edit-post/edit-post.tsx diff --git a/src/app/components/edit-post/index.ts b/src/app/components/edit-post/index.ts new file mode 100644 index 0000000..b5dffc9 --- /dev/null +++ b/src/app/components/edit-post/index.ts @@ -0,0 +1 @@ +export { EditPost } from "./edit-post";