feat: Add Docker support and improve API structure
- Introduced Dockerfile and .dockerignore for containerization. - Removed unused API route `src/app/api/hello/route.ts`. - Added new API route for fetching products by category. - Enhanced existing product category API to include descriptions. - Updated product categories data structure to include descriptions. - Improved product fetching logic in the product categories page. - Refactored breadcrumb component for better navigation. - Added new AchievementIconWhite component for UI consistency. - Updated Navbar to use routeFactory for better maintainability. - Enhanced styling in various components for improved responsiveness. - Removed obsolete language switcher component.
This commit is contained in:
@@ -94,18 +94,19 @@ import { usePathname } from 'next/navigation';
|
||||
import { useState } from 'react';
|
||||
import HamburgerMenu from '../hamburgerMenu';
|
||||
import { t } from '@/locales/translates';
|
||||
import routeFactory from '@/assets/constants/routeFactory';
|
||||
|
||||
export default function Navbar() {
|
||||
const [open, setOpen] = useState(false);
|
||||
const pathname = usePathname();
|
||||
|
||||
const links = [
|
||||
{ href: '/', label: t('pages_home_title') as string },
|
||||
{ href: '/about', label: t('pages_about_title') as string },
|
||||
{ href: '/blog', label: t('pages_blog_title') as string },
|
||||
{ href: '/contact', label: t('pages_contact_title') as string },
|
||||
{ href: '/product', label: t('pages_product_categories_title') as string },
|
||||
{ href: '/project', label: t('pages_projects_title') as string },
|
||||
routeFactory.home,
|
||||
routeFactory.productCategories,
|
||||
routeFactory.projects,
|
||||
routeFactory.blog,
|
||||
routeFactory.about,
|
||||
routeFactory.contact,
|
||||
];
|
||||
const linkClass = (href: string) =>
|
||||
pathname === href ? 'text-primary font-semibold' : 'text-white';
|
||||
@@ -123,13 +124,13 @@ export default function Navbar() {
|
||||
</Link>
|
||||
|
||||
<ul className="hidden space-x-6 text-sm md:flex lg:text-base">
|
||||
{links.map(({ href, label }) => (
|
||||
<li key={href}>
|
||||
{links.map(({ route, title }) => (
|
||||
<li key={route()}>
|
||||
<Link
|
||||
href={href}
|
||||
className={`${linkClass(href)} hover:text-primary-light`}
|
||||
href={route()}
|
||||
className={`${linkClass(route())} hover:text-primary-light`}
|
||||
>
|
||||
{label}
|
||||
{title}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user