Compare commits

..

No commits in common. "ai-dev" and "master" have entirely different histories.

7 changed files with 18 additions and 97 deletions

5
.gitignore vendored
View File

@ -1,8 +1,3 @@
node_modules/ node_modules/
*/node_modules/ */node_modules/
*/build/ */build/
**/node_modules/
**/build/
.DS_Store
.env

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{}

View File

@ -62,6 +62,17 @@ export default function WebSiteHeader({ projectName }: WebSiteHeaderProps) {
})} })}
</div> </div>
</div> </div>
<div
id='loginButton'
className='flex justify-center md:justify-start w-full md:w-auto mt-4 md:mt-0'
>
<BaseButton
href='/login'
label='Login'
color={`${design ? 'info' : 'white'}`}
className='text-midnightBlueTheme-buttonColor px-6 py-2 '
/>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -46,9 +46,6 @@ const menuNavBar: MenuNavBarItem[] = [
}, },
]; ];
export const webPagesNavBar = [ export const webPagesNavBar = [];
{ href: '/about', label: 'О нас' },
{ href: '/shop', label: 'Магазин' }, export default menuNavBar;
{ href: '/services', label: 'Наши услуги' },
{ href: '/login', label: 'Личный кабинет' },
];

View File

@ -1,24 +0,0 @@
import React from 'react';
import type { ReactElement } from 'react';
import Head from 'next/head';
import LayoutGuest from '../layouts/Guest';
import WebSiteHeader from '../components/WebPageComponents/Header';
import AboutUsComponent from '../components/WebPageComponents/AboutUsComponent';
import WebSiteFooter from '../components/WebPageComponents/Footer';
export default function AboutPage() {
return (
<>
<Head>
<title>О нас - my-logo</title>
</Head>
<WebSiteHeader projectName="my-logo" />
<AboutUsComponent />
<WebSiteFooter />
</>
);
}
AboutPage.getLayout = function getLayout(page: ReactElement) {
return <LayoutGuest>{page}</LayoutGuest>;
};

View File

@ -1,58 +0,0 @@
import React, { useEffect, useState } from 'react';
import type { ReactElement } from 'react';
import Head from 'next/head';
import LayoutGuest from '../layouts/Guest';
import WebSiteHeader from '../components/WebPageComponents/Header';
import WebSiteFooter from '../components/WebPageComponents/Footer';
import CardBox from '../components/CardBox';
import BaseButton from '../components/BaseButton';
export default function ShopPage() {
const [products, setProducts] = useState<any[]>([]);
useEffect(() => {
async function fetchProducts() {
try {
const res = await fetch('/api/products');
const data = await res.json();
setProducts(data);
} catch (error) {
console.error('Failed to load products', error);
}
}
fetchProducts();
}, []);
return (
<>
<Head>
<title>Магазин</title>
</Head>
<WebSiteHeader projectName="my-logo" />
<div className="container mx-auto px-4 py-8">
<h1 className="text-3xl font-bold mb-6">Магазин</h1>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
{products.map(product => (
<CardBox key={product.id} className="p-4">
{product.images && product.images.length > 0 && (
<img
src={product.images[0]}
alt={product.name}
className="w-full h-48 object-cover mb-4"
/>
)}
<h2 className="text-xl font-semibold mb-2">{product.name}</h2>
<p className="text-lg text-gray-700 mb-4">{product.price} руб.</p>
<BaseButton href="#" label="В корзину" className="w-full" />
</CardBox>
))}
</div>
</div>
<WebSiteFooter />
</>
);
}
ShopPage.getLayout = function getLayout(page: ReactElement) {
return <LayoutGuest>{page}</LayoutGuest>;
};