From bfa2c2c909cc9c29dd136a981f754ea805e53b8f Mon Sep 17 00:00:00 2001 From: sai nikhil kethe Date: Sat, 15 Jun 2024 18:48:46 +0000 Subject: [PATCH] ui updated --- src/components/CardComponent.tsx | 134 ++++++++++++++++++++++++++++++ src/components/Certificate.tsx | 6 +- src/components/ContentCard.tsx | 22 ++--- src/components/videothumbnail.tsx | 19 +++-- tsconfig.json | 10 +-- 5 files changed, 165 insertions(+), 26 deletions(-) create mode 100644 src/components/CardComponent.tsx diff --git a/src/components/CardComponent.tsx b/src/components/CardComponent.tsx new file mode 100644 index 000000000..2cdf707ed --- /dev/null +++ b/src/components/CardComponent.tsx @@ -0,0 +1,134 @@ +import React from 'react'; + +const CardComponent = ({ title, type }: { title: string; type: string }) => { + // Assuming your title is stored in a variable + + const [, secondPart] = title.split(' | '); + + return ( +
+
+
+

+ {secondPart} {/* Displaying the second part of the title */} +

+ {!secondPart && ( +

+ {title} {/* Displaying the second part of the title */} +

+ )} +
+
+ {type === 'video' && ( + + + + + + + + + + + )} + {type === 'notion' && ( + + + + + {' '} + {' '} + + + )} + {type === 'folder' && ( + + + + + {' '} + + {' '} + + {' '} + {' '} + {' '} + {' '} + + {' '} + + {' '} + {' '} + {' '} + {' '} + + {' '} + + {' '} + {' '} + {' '} + {' '} + + + )} +
+
+
+ ); +}; + +export default CardComponent; diff --git a/src/components/Certificate.tsx b/src/components/Certificate.tsx index 643fd3253..73441366c 100644 --- a/src/components/Certificate.tsx +++ b/src/components/Certificate.tsx @@ -95,11 +95,7 @@ export const CertificateComponent = ({
diff --git a/tsconfig.json b/tsconfig.json index 1f308869a..cec286f06 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,14 +16,14 @@ "incremental": true, "plugins": [ { - "name": "next" - } + "name": "next", + }, ], "paths": { "@/*": ["./src/*"], - "@public/*": ["./public/*"] - } + "@public/*": ["./public/*"], + }, }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], }