From f107a3e1796f972d687e5f3fe3484244fd54f7de Mon Sep 17 00:00:00 2001 From: Arthur Green Date: Tue, 31 Oct 2023 03:26:57 +0400 Subject: [PATCH] refactor: change file names --- playwright/index.html | 2 +- src/components/{ => Breadcrumbs}/Breadcrumbs.tsx | 0 src/components/{ => Breadcrumbs}/breadcrumbs.module.css | 0 src/components/Breadcrumbs/index.ts | 1 + src/components/{ => Input}/Input.stories.ts | 0 src/components/{ => Input}/Input.tsx | 0 src/components/Input/index.ts | 1 + src/pages/posts/[postId]/edit.tsx | 2 +- src/pages/posts/new.tsx | 2 +- 9 files changed, 5 insertions(+), 3 deletions(-) rename src/components/{ => Breadcrumbs}/Breadcrumbs.tsx (100%) rename src/components/{ => Breadcrumbs}/breadcrumbs.module.css (100%) create mode 100644 src/components/Breadcrumbs/index.ts rename src/components/{ => Input}/Input.stories.ts (100%) rename src/components/{ => Input}/Input.tsx (100%) create mode 100644 src/components/Input/index.ts diff --git a/playwright/index.html b/playwright/index.html index 37f612fa..71c4d026 100644 --- a/playwright/index.html +++ b/playwright/index.html @@ -3,7 +3,7 @@ - Testing Page + Local Microblogging Client
diff --git a/src/components/Breadcrumbs.tsx b/src/components/Breadcrumbs/Breadcrumbs.tsx similarity index 100% rename from src/components/Breadcrumbs.tsx rename to src/components/Breadcrumbs/Breadcrumbs.tsx diff --git a/src/components/breadcrumbs.module.css b/src/components/Breadcrumbs/breadcrumbs.module.css similarity index 100% rename from src/components/breadcrumbs.module.css rename to src/components/Breadcrumbs/breadcrumbs.module.css diff --git a/src/components/Breadcrumbs/index.ts b/src/components/Breadcrumbs/index.ts new file mode 100644 index 00000000..3ff68ca5 --- /dev/null +++ b/src/components/Breadcrumbs/index.ts @@ -0,0 +1 @@ +export { default } from './Breadcrumbs'; diff --git a/src/components/Input.stories.ts b/src/components/Input/Input.stories.ts similarity index 100% rename from src/components/Input.stories.ts rename to src/components/Input/Input.stories.ts diff --git a/src/components/Input.tsx b/src/components/Input/Input.tsx similarity index 100% rename from src/components/Input.tsx rename to src/components/Input/Input.tsx diff --git a/src/components/Input/index.ts b/src/components/Input/index.ts new file mode 100644 index 00000000..a2e60496 --- /dev/null +++ b/src/components/Input/index.ts @@ -0,0 +1 @@ +export { default } from './Input'; diff --git a/src/pages/posts/[postId]/edit.tsx b/src/pages/posts/[postId]/edit.tsx index b4e6be55..84683c5a 100644 --- a/src/pages/posts/[postId]/edit.tsx +++ b/src/pages/posts/[postId]/edit.tsx @@ -5,7 +5,7 @@ import { useLiveQuery } from 'dexie-react-hooks'; import { db } from '@services/db'; -import { Input } from '@components/Input'; +import Input from '@components/Input'; import type { IBlogPost } from '@components/PostPreview'; interface IBlogPostProps { diff --git a/src/pages/posts/new.tsx b/src/pages/posts/new.tsx index db6da50c..52613bf3 100644 --- a/src/pages/posts/new.tsx +++ b/src/pages/posts/new.tsx @@ -5,7 +5,7 @@ import { v4 as uuidv4 } from 'uuid'; import { db } from '@services/db'; -import { Input } from '@components/Input'; +import Input from '@components/Input'; function getRandomInt(max: number) { return Math.floor(Math.random() * max);