debug for build
This commit is contained in:
@@ -4,16 +4,21 @@ import Breadcrumb from '@/components/layout/breadcrumb';
|
||||
import { IBreadcrumbItem } from '@/components/layout/breadcrumb/breadcrumb';
|
||||
import ContentGenerator from '@/components/layout/contentGenerator';
|
||||
import InnerPageBanner from '@/components/layout/innerPages/banner';
|
||||
import { ILayoutLocaleParams } from '@/models/layout';
|
||||
import { IPageParams } from '@/models/layout';
|
||||
import { getPost } from '@/services/blog';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
interface IPageParams extends ILayoutLocaleParams {
|
||||
interface IParams {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: { params: IPageParams }) {
|
||||
const { id: postId, locale } = await params;
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: IPageParams<IParams>;
|
||||
}) {
|
||||
const paramsData = await params;
|
||||
const { id: postId, locale } = paramsData;
|
||||
const t = await getTranslations({ locale });
|
||||
const postData = await getPost(postId);
|
||||
|
||||
@@ -23,7 +28,11 @@ export async function generateMetadata({ params }: { params: IPageParams }) {
|
||||
};
|
||||
}
|
||||
|
||||
export default async function PostPage({ params }: { params: IPageParams }) {
|
||||
export default async function PostPage({
|
||||
params,
|
||||
}: {
|
||||
params: IPageParams<IParams>;
|
||||
}) {
|
||||
const paramsData = await params;
|
||||
const t = await getTranslations({ locale: paramsData.locale });
|
||||
|
||||
|
||||
@@ -4,15 +4,19 @@ import Breadcrumb from '@/components/layout/breadcrumb';
|
||||
import { IBreadcrumbItem } from '@/components/layout/breadcrumb/breadcrumb';
|
||||
import ContentGenerator from '@/components/layout/contentGenerator';
|
||||
import InnerPageBanner from '@/components/layout/innerPages/banner';
|
||||
import { ILayoutLocaleParams } from '@/models/layout';
|
||||
import { ILayoutLocaleParams, IPageParams } from '@/models/layout';
|
||||
import { getProject } from '@/services/projects';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
interface IPageParams extends ILayoutLocaleParams {
|
||||
interface IParams {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: { params: IPageParams }) {
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: IPageParams<IParams>;
|
||||
}) {
|
||||
const { id: projectId, locale } = await params;
|
||||
const t = await getTranslations({ locale });
|
||||
const project = await getProject(projectId);
|
||||
@@ -23,7 +27,11 @@ export async function generateMetadata({ params }: { params: IPageParams }) {
|
||||
};
|
||||
}
|
||||
|
||||
export default async function ProjectPage({ params }: { params: IPageParams }) {
|
||||
export default async function ProjectPage({
|
||||
params,
|
||||
}: {
|
||||
params: IPageParams<IParams>;
|
||||
}) {
|
||||
const paramsData = await params;
|
||||
const t = await getTranslations({ locale: paramsData.locale });
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export const productsRelatedByCategory = {
|
||||
export function generateProductsForCategory(
|
||||
categoryId: string,
|
||||
): IProductCardProps[] {
|
||||
// @ts-ignore
|
||||
const relatedProducts = (productsRelatedByCategory[categoryId] ||
|
||||
[]) as IProductCardProps[];
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { productCategoriesData } from './data';
|
||||
import { productsRelatedByCategory } from './[id]/products/data';
|
||||
|
||||
const getTypesCount = (categoryId: string) =>
|
||||
// @ts-ignore
|
||||
productsRelatedByCategory[categoryId]?.length || 0;
|
||||
|
||||
const setRelatedLocaleData = (productCategory: APIProductCategoryEntity) => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { IProductCardProps } from './productCard.d';
|
||||
|
||||
export default function ProductCard({
|
||||
title,
|
||||
model,
|
||||
imageSrc,
|
||||
size,
|
||||
}: IProductCardProps) {
|
||||
@@ -10,11 +10,11 @@ export default function ProductCard({
|
||||
<div className="aspect-square w-full">
|
||||
<img
|
||||
src={imageSrc}
|
||||
alt={title}
|
||||
alt={model}
|
||||
className="h-full w-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
<h3 className="mt-4 mb-10 text-xl font-bold text-gray-500">{title}</h3>
|
||||
<h3 className="mt-4 mb-10 text-xl font-bold text-gray-500">{model}</h3>
|
||||
<span className="text-base font-normal text-gray-300">{size}</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user