diff --git a/styles/font.css b/assets/font.css similarity index 100% rename from styles/font.css rename to assets/font.css diff --git a/styles/global.css b/assets/global.css similarity index 100% rename from styles/global.css rename to assets/global.css diff --git a/components/Avatar/Avatar.module.css b/components/core/Avatar/Avatar.module.css similarity index 100% rename from components/Avatar/Avatar.module.css rename to components/core/Avatar/Avatar.module.css diff --git a/components/Avatar/Avatar.tsx b/components/core/Avatar/Avatar.tsx similarity index 100% rename from components/Avatar/Avatar.tsx rename to components/core/Avatar/Avatar.tsx diff --git a/components/Avatar/index.ts b/components/core/Avatar/index.ts similarity index 100% rename from components/Avatar/index.ts rename to components/core/Avatar/index.ts diff --git a/components/Featurebar/Featurebar.module.css b/components/core/Featurebar/Featurebar.module.css similarity index 100% rename from components/Featurebar/Featurebar.module.css rename to components/core/Featurebar/Featurebar.module.css diff --git a/components/Featurebar/Featurebar.tsx b/components/core/Featurebar/Featurebar.tsx similarity index 100% rename from components/Featurebar/Featurebar.tsx rename to components/core/Featurebar/Featurebar.tsx diff --git a/components/Featurebar/index.ts b/components/core/Featurebar/index.ts similarity index 100% rename from components/Featurebar/index.ts rename to components/core/Featurebar/index.ts diff --git a/components/Footer/Footer.module.css b/components/core/Footer/Footer.module.css similarity index 100% rename from components/Footer/Footer.module.css rename to components/core/Footer/Footer.module.css diff --git a/components/Footer/Footer.tsx b/components/core/Footer/Footer.tsx similarity index 90% rename from components/Footer/Footer.tsx rename to components/core/Footer/Footer.tsx index 6dc6a59cc..ef662e61b 100644 --- a/components/Footer/Footer.tsx +++ b/components/core/Footer/Footer.tsx @@ -1,7 +1,7 @@ import cn from "classnames"; import React, { FunctionComponent } from "react"; import s from "./Footer.module.css"; -import { Container } from "ui"; +import { Container } from "@components/ui"; interface Props { className?: string; diff --git a/components/Footer/index.ts b/components/core/Footer/index.ts similarity index 100% rename from components/Footer/index.ts rename to components/core/Footer/index.ts diff --git a/components/Layout/Layout.module.css b/components/core/Layout/Layout.module.css similarity index 100% rename from components/Layout/Layout.module.css rename to components/core/Layout/Layout.module.css diff --git a/components/Layout/Layout.tsx b/components/core/Layout/Layout.tsx similarity index 86% rename from components/Layout/Layout.tsx rename to components/core/Layout/Layout.tsx index c3c2b07ab..71f3e6668 100644 --- a/components/Layout/Layout.tsx +++ b/components/core/Layout/Layout.tsx @@ -1,8 +1,8 @@ import cn from "classnames"; import React, { FunctionComponent } from "react"; import s from "./Layout.module.css"; -import { Navbar, Featurebar } from "components"; -import { Container } from "ui"; +import { Navbar, Featurebar } from "@components/core"; +import { Container } from "@components/ui"; interface Props { className?: string; diff --git a/components/Layout/index.ts b/components/core/Layout/index.ts similarity index 100% rename from components/Layout/index.ts rename to components/core/Layout/index.ts diff --git a/components/Navbar/Navbar.module.css b/components/core/Navbar/Navbar.module.css similarity index 100% rename from components/Navbar/Navbar.module.css rename to components/core/Navbar/Navbar.module.css diff --git a/components/Navbar/Navbar.tsx b/components/core/Navbar/Navbar.tsx similarity index 87% rename from components/Navbar/Navbar.tsx rename to components/core/Navbar/Navbar.tsx index 450553887..8cb8b2143 100644 --- a/components/Navbar/Navbar.tsx +++ b/components/core/Navbar/Navbar.tsx @@ -1,8 +1,8 @@ import cn from "classnames"; import React, { FunctionComponent } from "react"; import s from "./Navbar.module.css"; -import { Logo, Container } from "ui"; -import { Avatar, Searchbar } from "components"; +import { Logo, Container } from "@components/ui"; +import { Avatar, Searchbar } from "@components/core"; interface Props { className?: string; children?: any; diff --git a/components/Navbar/index.ts b/components/core/Navbar/index.ts similarity index 100% rename from components/Navbar/index.ts rename to components/core/Navbar/index.ts diff --git a/components/Searchbar/Searchbar.module.css b/components/core/Searchbar/Searchbar.module.css similarity index 100% rename from components/Searchbar/Searchbar.module.css rename to components/core/Searchbar/Searchbar.module.css diff --git a/components/Searchbar/Searchbar.tsx b/components/core/Searchbar/Searchbar.tsx similarity index 100% rename from components/Searchbar/Searchbar.tsx rename to components/core/Searchbar/Searchbar.tsx diff --git a/components/Searchbar/index.ts b/components/core/Searchbar/index.ts similarity index 100% rename from components/Searchbar/index.ts rename to components/core/Searchbar/index.ts diff --git a/components/index.ts b/components/core/index.ts similarity index 83% rename from components/index.ts rename to components/core/index.ts index 1c60119cd..faf5aea3e 100644 --- a/components/index.ts +++ b/components/core/index.ts @@ -2,6 +2,5 @@ export { default as Avatar } from "./Avatar"; export { default as Footer } from "./Footer"; export { default as Navbar } from "./Navbar"; export { default as Searchbar } from "./Searchbar"; -export { default as ProductView } from "./ProductView"; export { default as Layout } from "./Layout"; export { default as Featurebar } from "./Featurebar"; diff --git a/components/ProductView/ProductView.module.css b/components/product/ProductView/ProductView.module.css similarity index 100% rename from components/ProductView/ProductView.module.css rename to components/product/ProductView/ProductView.module.css diff --git a/components/ProductView/ProductView.tsx b/components/product/ProductView/ProductView.tsx similarity index 98% rename from components/ProductView/ProductView.tsx rename to components/product/ProductView/ProductView.tsx index 7d4c52a1d..e5ed41262 100644 --- a/components/ProductView/ProductView.tsx +++ b/components/product/ProductView/ProductView.tsx @@ -1,7 +1,7 @@ import cn from "classnames"; import React, { FunctionComponent } from "react"; import s from "./ProductView.module.css"; -import { Button } from "ui"; +import { Button } from "@components/ui"; interface ProductData { description: string; diff --git a/components/ProductView/index.ts b/components/product/ProductView/index.ts similarity index 100% rename from components/ProductView/index.ts rename to components/product/ProductView/index.ts diff --git a/components/product/index.ts b/components/product/index.ts new file mode 100644 index 000000000..d5adcbac5 --- /dev/null +++ b/components/product/index.ts @@ -0,0 +1 @@ +export { default as ProductView } from "./ProductView"; diff --git a/ui/Button/Button.module.css b/components/ui/Button/Button.module.css similarity index 100% rename from ui/Button/Button.module.css rename to components/ui/Button/Button.module.css diff --git a/ui/Button/Button.tsx b/components/ui/Button/Button.tsx similarity index 100% rename from ui/Button/Button.tsx rename to components/ui/Button/Button.tsx diff --git a/ui/Button/index.ts b/components/ui/Button/index.ts similarity index 100% rename from ui/Button/index.ts rename to components/ui/Button/index.ts diff --git a/ui/Container/Container.module.css b/components/ui/Container/Container.module.css similarity index 100% rename from ui/Container/Container.module.css rename to components/ui/Container/Container.module.css diff --git a/ui/Container/Container.tsx b/components/ui/Container/Container.tsx similarity index 100% rename from ui/Container/Container.tsx rename to components/ui/Container/Container.tsx diff --git a/ui/Container/index.ts b/components/ui/Container/index.ts similarity index 100% rename from ui/Container/index.ts rename to components/ui/Container/index.ts diff --git a/ui/Logo/Logo.tsx b/components/ui/Logo/Logo.tsx similarity index 100% rename from ui/Logo/Logo.tsx rename to components/ui/Logo/Logo.tsx diff --git a/ui/Logo/index.ts b/components/ui/Logo/index.ts similarity index 100% rename from ui/Logo/index.ts rename to components/ui/Logo/index.ts diff --git a/ui/README.md b/components/ui/README.md similarity index 100% rename from ui/README.md rename to components/ui/README.md diff --git a/ui/_BLANK/Featurebar.tsx b/components/ui/_BLANK/Featurebar.tsx similarity index 100% rename from ui/_BLANK/Featurebar.tsx rename to components/ui/_BLANK/Featurebar.tsx diff --git a/ui/_BLANK/index.ts b/components/ui/_BLANK/index.ts similarity index 100% rename from ui/_BLANK/index.ts rename to components/ui/_BLANK/index.ts diff --git a/ui/index.ts b/components/ui/index.ts similarity index 100% rename from ui/index.ts rename to components/ui/index.ts diff --git a/pages/_app.tsx b/pages/_app.tsx index d6cafe98c..68a70e9de 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,4 +1,4 @@ -import "@styles/global.css"; +import "@assets/global.css"; export default function MyApp({ Component, pageProps }) { return ( diff --git a/pages/index.tsx b/pages/index.tsx index 86c2a09c8..3f7ab723f 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,4 +1,4 @@ -import { Layout } from "components"; +import { Layout } from "@components/core"; export default function Home() { return ( diff --git a/pages/product/[id].tsx b/pages/product/[id].tsx index fdf872787..347459bee 100644 --- a/pages/product/[id].tsx +++ b/pages/product/[id].tsx @@ -1,6 +1,6 @@ import { useRouter } from "next/router"; -import { ProductView, Layout } from "components"; -import ErrorPage from "next/error"; +import { Layout } from "@components/core"; +import { ProductView } from "@components/product"; export async function getStaticProps() { const productData = { diff --git a/tsconfig.json b/tsconfig.json index 7a2d7ac8a..371c18a6a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,7 @@ "jsx": "preserve", "paths": { "@components/*": ["components/*"], - "@styles/*": ["styles/*"] + "@assets/*": ["assets/*"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],