mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Add prettier configuration
This commit is contained in:
+34
-21
@@ -2,27 +2,40 @@ import Image from 'next/image';
|
||||
import { StyledCard } from './styles';
|
||||
import { Props } from './types';
|
||||
|
||||
const Card = ({ title, description, image, tags, href, target, onClick }: Props) => {
|
||||
return (
|
||||
<StyledCard href={href} onClick={onClick} image={image ? Boolean(image) : undefined} target={target}>
|
||||
<div className='card-content'>
|
||||
<h3>{title}</h3>
|
||||
<p>{description}</p>
|
||||
{tags && (
|
||||
<div className='tags-wrapper'>
|
||||
{tags.map((tag, index) => (
|
||||
<span key={index}>#{tag} </span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{image && (
|
||||
<div className='card-image'>
|
||||
<Image alt={title} src={image} fill />
|
||||
</div>
|
||||
)}
|
||||
</StyledCard>
|
||||
);
|
||||
const Card = ({
|
||||
title,
|
||||
description,
|
||||
image,
|
||||
tags,
|
||||
href,
|
||||
target,
|
||||
onClick,
|
||||
}: Props) => {
|
||||
return (
|
||||
<StyledCard
|
||||
href={href}
|
||||
onClick={onClick}
|
||||
image={image ? Boolean(image) : undefined}
|
||||
target={target}
|
||||
>
|
||||
<div className='card-content'>
|
||||
<h3>{title}</h3>
|
||||
<p>{description}</p>
|
||||
{tags && (
|
||||
<div className='tags-wrapper'>
|
||||
{tags.map((tag, index) => (
|
||||
<span key={index}>#{tag} </span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{image && (
|
||||
<div className='card-image'>
|
||||
<Image alt={title} src={image} fill />
|
||||
</div>
|
||||
)}
|
||||
</StyledCard>
|
||||
);
|
||||
};
|
||||
|
||||
export default Card;
|
||||
|
||||
Reference in New Issue
Block a user