debug for build

This commit is contained in:
2025-06-13 20:03:24 +03:30
parent efef7fdbbb
commit 70699ec103
3 changed files with 9 additions and 3 deletions
@@ -1,14 +1,14 @@
import { NextResponse, NextRequest } from 'next/server';
import { cookies } from 'next/headers';
import { generateProductsForCategory } from './data';
import { productCategories } from '@/app/api/project_categories/data';
import { productCategoriesData } from '../../data';
export async function GET(request: NextRequest, context: any) {
const cookieStore = await cookies();
const lang = cookieStore.get('locale')?.value || 'en';
const params = await context.params;
const category = productCategories.find((cat) => cat.id === params.id);
const category = productCategoriesData.find((cat) => cat.id === params.id);
if (!category) {
return NextResponse.json({ error: 'Not found' }, { status: 404 });
+2
View File
@@ -4,6 +4,7 @@
import { NextResponse } from 'next/server';
import { productCategoriesData } from '../product_categories/data';
import { host } from '@/config';
import { projects } from '../projects/data';
const pages = [
'/',
@@ -23,6 +24,7 @@ export async function GET() {
(productCategory) => `/product-categories/${productCategory.id}`,
),
);
pages.push(...projects.map((project) => `/projects/${project.id}`));
const urls = pages.flatMap((page) =>
locales.map((locale) => {
+5 -1
View File
@@ -3,7 +3,11 @@ import Link from 'next/link';
import { IProjectCardProps } from './project';
import { getProjects } from '@/services/projects';
export default async function ProjectsGrid({ projects }) {
export default async function ProjectsGrid({
projects,
}: {
projects: IProjectCardProps[];
}) {
return (
<div className="container mx-auto grid grid-cols-1 gap-6 px-4 pt-12 pb-0 md:grid-cols-2 md:py-28">
{projects.map((project, index) => (