diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-29 12:13:34 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-29 18:30:05 +0200 |
| commit | 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 (patch) | |
| tree | bfc2b4a475cb06a787e2c4bdf284165644e82952 /src/components/ProjectPreview/ProjectPreview.tsx | |
| parent | 5324664e87bedfaa01ba62c0c847ef5b861e69b3 (diff) | |
chore: remove old pages, components, helpers and types
Since I'm using new components, I will also rewrite the GraphQL queries
so it is easier to start from scratch.
Diffstat (limited to 'src/components/ProjectPreview/ProjectPreview.tsx')
| -rw-r--r-- | src/components/ProjectPreview/ProjectPreview.tsx | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/components/ProjectPreview/ProjectPreview.tsx b/src/components/ProjectPreview/ProjectPreview.tsx deleted file mode 100644 index 1e1ced2..0000000 --- a/src/components/ProjectPreview/ProjectPreview.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { Project } from '@ts/types/app'; -import { slugify } from '@utils/helpers/slugify'; -import Image from 'next/image'; -import Link from 'next/link'; -import { useIntl } from 'react-intl'; -import styles from './ProjectPreview.module.scss'; - -const ProjectPreview = ({ project }: { project: Project }) => { - const { id, meta, tagline, title } = project; - const intl = useIntl(); - - return ( - <Link href={`/projet/${project.slug}`}> - <a className={styles.link}> - <article className={styles.article}> - <header> - {meta.hasCover && ( - <div className={styles.cover}> - <Image - src={`/projects/${id}.jpg`} - layout="fill" - objectFit="contain" - objectPosition="center" - alt={intl.formatMessage( - { - defaultMessage: '{title} picture', - description: 'ProjectPreview: cover alt text', - id: '2pykor', - }, - { title } - )} - /> - </div> - )} - <h2 className={styles.title}>{title}</h2> - </header> - {tagline && ( - <div - className={styles.body} - dangerouslySetInnerHTML={{ __html: tagline }} - ></div> - )} - <footer className={styles.footer}> - <dl className={styles.meta}> - {meta.technologies && ( - <div className={styles.meta__item}> - <dt className="screen-reader-text"> - {intl.formatMessage( - { - defaultMessage: - '{count, plural, =0 {Technologies:} one {Technology:} other {Technologies:}}', - description: 'ProjectPreview: technologies list label', - id: 'okFrAO', - }, - { count: meta.technologies.length } - )} - </dt> - {meta.technologies.map((techno) => ( - <dd key={slugify(techno)} className={styles.techno}> - {techno} - </dd> - ))} - </div> - )} - </dl> - </footer> - </article> - </a> - </Link> - ); -}; - -export default ProjectPreview; |
