first commit

This commit is contained in:
Samandar Turgunboyev
2025-12-15 18:41:13 +05:00
parent a5b46a9f26
commit 6bf86f39c6
109 changed files with 7007 additions and 295 deletions

View File

@@ -0,0 +1,11 @@
import Login from '@/features/auth/ui/Login';
const page = () => {
return (
<div>
<Login />
</div>
);
};
export default page;

View File

@@ -0,0 +1,11 @@
import OrderPage from '@/features/cart/ui/OrderPage';
const page = () => {
return (
<div>
<OrderPage />
</div>
);
};
export default page;

View File

@@ -0,0 +1,11 @@
import CartPage from '@/features/cart/ui/CartPage';
const page = () => {
return (
<div>
<CartPage />
</div>
);
};
export default page;

View File

@@ -0,0 +1,11 @@
import Product from '@/features/category/ui/Product';
const page = () => {
return (
<div>
<Product />
</div>
);
};
export default page;

View File

@@ -0,0 +1,11 @@
import SubCategory from '@/features/category/ui/SubCategory';
const page = () => {
return (
<div>
<SubCategory />
</div>
);
};
export default page;

View File

@@ -0,0 +1,11 @@
import Category from '@/features/category/ui/Category';
const page = () => {
return (
<div>
<Category />
</div>
);
};
export default page;

View File

@@ -0,0 +1,11 @@
import Favourite from '@/features/favourite/ui/Favourite';
const page = () => {
return (
<div>
<Favourite />
</div>
);
};
export default page;

View 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 />}
</>
);
}

View File

@@ -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>

View File

@@ -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>
);
}

View File

@@ -0,0 +1,11 @@
import ProductDetail from '@/features/product/ui/Product';
const page = () => {
return (
<div>
<ProductDetail />
</div>
);
};
export default page;

View File

@@ -0,0 +1,11 @@
import Profile from '@/features/profile/ui/Profile';
const page = () => {
return (
<div>
<Profile />
</div>
);
};
export default page;

View File

@@ -0,0 +1,11 @@
import SearchResult from '@/features/search/ui/Search';
const page = () => {
return (
<div>
<SearchResult />
</div>
);
};
export default page;