fix: fix type Image

This commit is contained in:
quangnhankie 2021-09-08 11:43:04 +07:00
parent ae5e7e8d43
commit d642460c65
4 changed files with 11 additions and 13 deletions

View File

@ -65,10 +65,9 @@ export default function Test() {
return ( return (
<> <>
{/* <RecipeDetail /> */} {/* <BlogDetailPage /> */}
<BlogDetailPage />
{/* <RecipeListPage/> */} <RecipeListPage/>
{/* <MenuNavigation heading="CATEGORIES" categories={CATEGORY}/> {/* <MenuNavigation heading="CATEGORIES" categories={CATEGORY}/>
<MenuNavigationProductList categories={CATEGORY} brands={BRAND} featured={BRAND}/> */} <MenuNavigationProductList categories={CATEGORY} brands={BRAND} featured={BRAND}/> */}

View File

@ -114,40 +114,40 @@ const CATEGORYSELECT = [
const RECIPES = [ const RECIPES = [
{ {
id: '1', id: '1',
image: blog1, image: blog1.src,
title: "Want to Lose Weight? Here are 10 DEBM Diet Guidelines for Beginners", title: "Want to Lose Weight? Here are 10 DEBM Diet Guidelines for Beginners",
description: 'The DEBM diet stands for "Delicious Happy Fun Diet". This diet was popularized by Robert...', description: 'The DEBM diet stands for "Delicious Happy Fun Diet". This diet was popularized by Robert...',
link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=veggie` link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=veggie`
}, { }, {
id: '2', id: '2',
image: blog2, image: blog2.src,
title: "9 Ways to Make an Aloe Vera Mask at Home", title: "9 Ways to Make an Aloe Vera Mask at Home",
description: 'Aloe vera or aloe vera is a green plant, has thorns on the side of the skin with yellowish patches and...', description: 'Aloe vera or aloe vera is a green plant, has thorns on the side of the skin with yellowish patches and...',
link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=seafood` link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=seafood`
} }
, { , {
id: '3', id: '3',
image: blog3, image: blog3.src,
title: "Don't Buy Wrong, Here Are 7 Ways to Choose a Ripe Dragon Fruit", title: "Don't Buy Wrong, Here Are 7 Ways to Choose a Ripe Dragon Fruit",
description: 'Aloe vera or aloe vera is a green plant, has thorns on the side of the skin with yellowish patches and...', description: 'Aloe vera or aloe vera is a green plant, has thorns on the side of the skin with yellowish patches and...',
link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=coffee-bean` link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=coffee-bean`
} }
, { , {
id: '4', id: '4',
image: blog4, image: blog4.src,
title: "Want to Lose Weight? Here are 10 DEBM Diet Guidelines for Beginners", title: "Want to Lose Weight? Here are 10 DEBM Diet Guidelines for Beginners",
description: 'The DEBM diet stands for "Delicious Happy Fun Diet". This diet was popularized by Robert...', description: 'The DEBM diet stands for "Delicious Happy Fun Diet". This diet was popularized by Robert...',
link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=sauce`, link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=sauce`,
}, { }, {
id: '5', id: '5',
image: blog5, image: blog5.src,
title: "9 Ways to Make an Aloe Vera Mask at Home", title: "9 Ways to Make an Aloe Vera Mask at Home",
description: 'Aloe vera or aloe vera is a green plant, has thorns on the side of the skin with yellowish patches and...', description: 'Aloe vera or aloe vera is a green plant, has thorns on the side of the skin with yellowish patches and...',
link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=sauce`, link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=sauce`,
} }
, { , {
id: '6', id: '6',
image: blog6, image: blog6.src,
title: "Don't Buy Wrong, Here Are 7 Ways to Choose a Ripe Dragon Fruit", title: "Don't Buy Wrong, Here Are 7 Ways to Choose a Ripe Dragon Fruit",
description: 'Dragon fruit is a type of fruit that is a favorite for many people because of its delicious and fresh...', description: 'Dragon fruit is a type of fruit that is a favorite for many people because of its delicious and fresh...',
link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=sauce`, link: `${ROUTE.PRODUCTS}?${QUERY_KEY.RECIPES}=sauce`,

View File

@ -1,11 +1,10 @@
import Image from "next/image";
import Link from 'next/link'; import Link from 'next/link';
import React from 'react'; import React from 'react';
import s from './RecipesItem.module.scss'; import s from './RecipesItem.module.scss';
interface RecipesItem { interface RecipesItem {
image:StaticImageData, image:string,
name: string, name: string,
description:string, description:string,
link: string link: string
@ -17,7 +16,7 @@ const RecipesItem = ({ image, name,description, link }: RecipesItem) => {
<div className={s.recipesItemImage}> <div className={s.recipesItemImage}>
<Link href={link}> <Link href={link}>
<a> <a>
<Image src={image} /> <img src={image} />
</a> </a>
</Link> </Link>
</div> </div>

View File

@ -8,7 +8,7 @@ interface Props{
recipes:{ recipes:{
id:string, id:string,
title:string, title:string,
image:StaticImageData, image:string,
description:string, description:string,
link:string link:string
}[], }[],