summaryrefslogtreecommitdiffstats
path: root/src/ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-27 11:43:33 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-27 11:43:33 +0100
commite9c68e4b3ddcfe638bc611f421d55f372e0100e9 (patch)
treeadd5778b0eea6879cb49bbd4bbf9164479ece8e8 /src/ts
parent44a72320927ee3752ae600829c0c618b68e0f19d (diff)
fix(project): make sure the project cover is displayed
Next.js does not support the dynamic import of images. Sometimes the images was displayed and other times the loading did not finish. So even if I would like to keep the content in a same place, I choose to put the projects covers inside the public directory. Then I use a hasCover boolean to determine if the project cover need to be printed.
Diffstat (limited to 'src/ts')
-rw-r--r--src/ts/types/app.ts21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts
index ddd64d1..636aeed 100644
--- a/src/ts/types/app.ts
+++ b/src/ts/types/app.ts
@@ -94,15 +94,6 @@ export type Meta = {
updatedOn: string;
};
-export type ProjectMeta = Omit<Meta, 'title'> & {
- license: string;
- repos?: {
- github?: string;
- gitlab?: string;
- };
- technologies?: string[];
-};
-
export type PageInfo = {
endCursor: string;
hasNextPage: boolean;
@@ -110,7 +101,7 @@ export type PageInfo = {
};
export type Project = {
- cover: string;
+ cover?: string;
id: string;
intro: string;
meta: ProjectMeta;
@@ -123,6 +114,16 @@ export type Project = {
};
};
+export type ProjectMeta = Omit<Meta, 'title'> & {
+ hasCover: boolean;
+ license: string;
+ repos?: {
+ github?: string;
+ gitlab?: string;
+ };
+ technologies?: string[];
+};
+
export type ProjectProps = {
project: Project;
};