From bf0860f2ea74dc2650ed9ea0287d987c24bdd6af Mon Sep 17 00:00:00 2001 From: Harpreet Singh Date: Tue, 16 Apr 2024 17:30:12 +0200 Subject: [PATCH] fix: reset seed and added key to BreadCrumbComponent --- prisma/seed.ts | 72 +++++++++----------------- src/components/BreadCrumbComponent.tsx | 6 +-- 2 files changed, 27 insertions(+), 51 deletions(-) diff --git a/prisma/seed.ts b/prisma/seed.ts index b84e34a19..fe3ba0b86 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -147,54 +147,30 @@ async function main() { data: { id: 1, contentId: 3, - // video_1080p_mp4_1: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_1080p_mp4_2: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_1080p_mp4_3: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_1080p_mp4_4: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_1080p_1: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_1080p_2: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_1080p_3: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_1080p_4: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_720p_mp4_1: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_720p_mp4_2: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_720p_mp4_3: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_720p_mp4_4: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_720p_1: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_720p_2: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_720p_3: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_720p_4: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_360p_mp4_1: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_360p_mp4_2: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_360p_mp4_3: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_360p_mp4_4: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_360p_1: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_360p_2: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_360p_3: 'https://www.w3schools.com/html/mov_bbb.mp4', - // video_360p_4: 'https://www.w3schools.com/html/mov_bbb.mp4', - video_1080p_mp4_1: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_1080p_mp4_2: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_1080p_mp4_3: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_1080p_mp4_4: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_1080p_1: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_1080p_2: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_1080p_3: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_1080p_4: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_720p_mp4_1: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_720p_mp4_2: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_720p_mp4_3: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_720p_mp4_4: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_720p_1: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_720p_2: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_720p_3: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_720p_4: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_360p_mp4_1: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_360p_mp4_2: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_360p_mp4_3: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_360p_mp4_4: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_360p_1: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_360p_2: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_360p_3: 'https://www.youtube.com/watch?v=gYK8azCYjnU', - video_360p_4: 'https://www.youtube.com/watch?v=gYK8azCYjnU', + video_1080p_mp4_1: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_1080p_mp4_2: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_1080p_mp4_3: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_1080p_mp4_4: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_1080p_1: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_1080p_2: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_1080p_3: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_1080p_4: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_720p_mp4_1: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_720p_mp4_2: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_720p_mp4_3: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_720p_mp4_4: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_720p_1: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_720p_2: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_720p_3: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_720p_4: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_360p_mp4_1: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_360p_mp4_2: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_360p_mp4_3: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_360p_mp4_4: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_360p_1: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_360p_2: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_360p_3: 'https://www.w3schools.com/html/mov_bbb.mp4', + video_360p_4: 'https://www.w3schools.com/html/mov_bbb.mp4', slides: 'https://appx-recordings.s3.ap-south-1.amazonaws.com/drm/100x/slides/Loops%2C+callbacks.pdf', }, diff --git a/src/components/BreadCrumbComponent.tsx b/src/components/BreadCrumbComponent.tsx index 594a832e7..b12ddf985 100644 --- a/src/components/BreadCrumbComponent.tsx +++ b/src/components/BreadCrumbComponent.tsx @@ -10,7 +10,7 @@ import { } from '@/components/ui/breadcrumb'; import { Folder } from '@/db/course'; import Link from 'next/link'; -import { useMemo } from 'react'; +import { Fragment, useMemo } from 'react'; export default function BreadCrumbComponent({ rest, @@ -89,7 +89,7 @@ export default function BreadCrumbComponent({ finalRouteArray = [...rest]; } return ( - <> + {index !== array.length - 1 ? ( <> @@ -111,7 +111,7 @@ export default function BreadCrumbComponent({ )} - + ); })}