first commit
This commit is contained in:
11
src/app/[locale]/auth/page.tsx
Normal file
11
src/app/[locale]/auth/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import Login from '@/features/auth/ui/Login';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<Login />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
11
src/app/[locale]/cart/order/page.tsx
Normal file
11
src/app/[locale]/cart/order/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import OrderPage from '@/features/cart/ui/OrderPage';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<OrderPage />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
11
src/app/[locale]/cart/page.tsx
Normal file
11
src/app/[locale]/cart/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import CartPage from '@/features/cart/ui/CartPage';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<CartPage />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
11
src/app/[locale]/category/[categoryId]/[subId]/page.tsx
Normal file
11
src/app/[locale]/category/[categoryId]/[subId]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import Product from '@/features/category/ui/Product';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<Product />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
11
src/app/[locale]/category/[categoryId]/page.tsx
Normal file
11
src/app/[locale]/category/[categoryId]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import SubCategory from '@/features/category/ui/SubCategory';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<SubCategory />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
11
src/app/[locale]/category/page.tsx
Normal file
11
src/app/[locale]/category/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import Category from '@/features/category/ui/Category';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<Category />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
11
src/app/[locale]/favourite/page.tsx
Normal file
11
src/app/[locale]/favourite/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import Favourite from '@/features/favourite/ui/Favourite';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<Favourite />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
27
src/app/[locale]/layout-shell.tsx
Normal file
27
src/app/[locale]/layout-shell.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
'use client';
|
||||
|
||||
import { usePathname } from '@/shared/config/i18n/navigation';
|
||||
import Footer from '@/widgets/footer/ui';
|
||||
import Navbar from '@/widgets/navbar/ui';
|
||||
|
||||
const HIDE_FOOTER_ROUTES = ['/auth', '/checkout'];
|
||||
|
||||
export default function LayoutShell({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const pathname = usePathname();
|
||||
|
||||
const hideFooter = HIDE_FOOTER_ROUTES.some((route) =>
|
||||
pathname.startsWith(route),
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Navbar />
|
||||
{children}
|
||||
{!hideFooter && <Footer />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,17 +1,16 @@
|
||||
import type { Metadata } from 'next';
|
||||
import '../globals.css';
|
||||
import { golosText } from '@/shared/config/fonts';
|
||||
import { poppins } from '@/shared/config/fonts';
|
||||
import { routing } from '@/shared/config/i18n/routing';
|
||||
import QueryProvider from '@/shared/config/react-query/QueryProvider';
|
||||
import { ThemeProvider } from '@/shared/config/theme-provider';
|
||||
import { PRODUCT_INFO } from '@/shared/constants/data';
|
||||
import type { Metadata } from 'next';
|
||||
import { hasLocale, Locale, NextIntlClientProvider } from 'next-intl';
|
||||
import { routing } from '@/shared/config/i18n/routing';
|
||||
import { notFound } from 'next/navigation';
|
||||
import Footer from '@/widgets/footer/ui';
|
||||
import Navbar from '@/widgets/navbar/ui';
|
||||
import { ReactNode } from 'react';
|
||||
import { setRequestLocale } from 'next-intl/server';
|
||||
import QueryProvider from '@/shared/config/react-query/QueryProvider';
|
||||
import { notFound } from 'next/navigation';
|
||||
import Script from 'next/script';
|
||||
import { ReactNode } from 'react';
|
||||
import '../globals.css';
|
||||
import LayoutShell from './layout-shell';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: PRODUCT_INFO.name,
|
||||
@@ -39,7 +38,7 @@ export default async function RootLayout({ children, params }: Props) {
|
||||
|
||||
return (
|
||||
<html lang={locale} suppressHydrationWarning>
|
||||
<body className={`${golosText.variable} antialiased`}>
|
||||
<body className={`${poppins.className} antialiased`}>
|
||||
<NextIntlClientProvider locale={locale}>
|
||||
<ThemeProvider
|
||||
attribute={'class'}
|
||||
@@ -48,9 +47,7 @@ export default async function RootLayout({ children, params }: Props) {
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<QueryProvider>
|
||||
<Navbar />
|
||||
{children}
|
||||
<Footer />
|
||||
<LayoutShell>{children}</LayoutShell>
|
||||
</QueryProvider>
|
||||
</ThemeProvider>
|
||||
</NextIntlClientProvider>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { getPosts } from '@/shared/config/api/testApi';
|
||||
import Welcome from '@/widgets/welcome';
|
||||
import { subCategoriesData } from '@/features/category/lib/data';
|
||||
import { CategoryCarousel } from '@/widgets/categories/ui/category-carousel';
|
||||
import Welcome from '@/widgets/welcome/ui';
|
||||
|
||||
export default async function Home() {
|
||||
const res = await getPosts({ _limit: 1 });
|
||||
console.log('SSR res', res.data);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Welcome />
|
||||
{subCategoriesData.slice(0, 6).map((e) => (
|
||||
<CategoryCarousel category={e} key={e.id} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
11
src/app/[locale]/product/[product]/page.tsx
Normal file
11
src/app/[locale]/product/[product]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import ProductDetail from '@/features/product/ui/Product';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<ProductDetail />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
11
src/app/[locale]/profile/page.tsx
Normal file
11
src/app/[locale]/profile/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import Profile from '@/features/profile/ui/Profile';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<Profile />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
11
src/app/[locale]/search/page.tsx
Normal file
11
src/app/[locale]/search/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import SearchResult from '@/features/search/ui/Search';
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div>
|
||||
<SearchResult />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
Reference in New Issue
Block a user