From 7b33e78a882afaa97e7bc3255d2491786af158fc Mon Sep 17 00:00:00 2001 From: "Mr. Paradox" Date: Wed, 6 Nov 2024 20:53:08 +0530 Subject: [PATCH 1/7] fix(typo): Small cleanups for Privay Policy Page (#1542) Co-authored-by: adiiittt --- src/app/(marketing)/(policy)/privacy-policy/page.tsx | 5 +++++ .../(policy)/privacy-policy/privacy-policy.ts | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/(marketing)/(policy)/privacy-policy/page.tsx b/src/app/(marketing)/(policy)/privacy-policy/page.tsx index a09dccf71..192fd3db1 100644 --- a/src/app/(marketing)/(policy)/privacy-policy/page.tsx +++ b/src/app/(marketing)/(policy)/privacy-policy/page.tsx @@ -22,6 +22,11 @@ const PrivacyPolicyPage = () => {

Privacy Policy

+
+ Last Updated At:{' '} + November 2, 2024 +
+
{privacyPolicyContent.map((item) => ( Date: Thu, 7 Nov 2024 14:26:48 +0530 Subject: [PATCH 2/7] feat: add tooltip on hover of video title in search box (#1550) --- src/components/search/SearchResults.tsx | 2 +- src/components/search/VideoSearchCard.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx index fbef8c12d..851721f00 100644 --- a/src/components/search/SearchResults.tsx +++ b/src/components/search/SearchResults.tsx @@ -51,7 +51,7 @@ export function SearchResults({
{renderSearchResults()}
diff --git a/src/components/search/VideoSearchCard.tsx b/src/components/search/VideoSearchCard.tsx index c95c962b3..6ea5eed81 100644 --- a/src/components/search/VideoSearchCard.tsx +++ b/src/components/search/VideoSearchCard.tsx @@ -28,13 +28,19 @@ const VideoSearchCard: React.FC = ({ return ( - + {video.title} +
+ {video.title} +
); } From 5d2b86633589a6f11b21de1a91f6a6bfccf769ad Mon Sep 17 00:00:00 2001 From: ikramBagban <107988060+IkramBagban@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:37:47 +0530 Subject: [PATCH 3/7] refactor: add shadcn tooltip --- package.json | 2 +- pnpm-lock.yaml | 2 +- src/components/search/VideoSearchCard.tsx | 27 +++++++++++++++-------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 0ac21ecd6..466ac97a5 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-switch": "^1.1.0", - "@radix-ui/react-tooltip": "^1.0.7", + "@radix-ui/react-tooltip": "^1.1.2", "@tabler/icons-react": "^3.14.0", "@types/bcrypt": "^5.0.2", "@types/jsonwebtoken": "^9.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a39d1ca3..fdab6da43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,7 +63,7 @@ importers: specifier: ^1.1.0 version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-tooltip': - specifier: ^1.0.7 + specifier: ^1.1.2 version: 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tabler/icons-react': specifier: ^3.14.0 diff --git a/src/components/search/VideoSearchCard.tsx b/src/components/search/VideoSearchCard.tsx index 6ea5eed81..e8ab16302 100644 --- a/src/components/search/VideoSearchCard.tsx +++ b/src/components/search/VideoSearchCard.tsx @@ -2,6 +2,12 @@ import { TSearchedVideos } from '@/app/api/search/route'; import { Play } from 'lucide-react'; import Link from 'next/link'; import React from 'react'; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from '../ui/tooltip'; interface VideoSearchCardProps { video: TSearchedVideos; @@ -32,15 +38,18 @@ const VideoSearchCard: React.FC = ({ onClick={handleClick} > - - {video.title} - -
- {video.title} -
+ + + + + {video.title} + + + +

{video.title}

+
+
+
); } From 149ed4d8eca7a8b50315620e6ac73fa338a39bf9 Mon Sep 17 00:00:00 2001 From: ab7022 Date: Sat, 9 Nov 2024 00:52:18 +0530 Subject: [PATCH 4/7] Fix issue with certificate visibility --- src/app/certificate/page.tsx | 2 +- src/components/Certificate.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/certificate/page.tsx b/src/app/certificate/page.tsx index 64f1b1657..8aa1738ee 100644 --- a/src/app/certificate/page.tsx +++ b/src/app/certificate/page.tsx @@ -5,7 +5,7 @@ const CertificatePage = async () => { const certificates = await getCertificates(); return ( -
+
{certificates?.map(({ cert, course, user }) => ( + {certificateImageUrl ? ( Date: Sun, 10 Nov 2024 14:42:14 +0530 Subject: [PATCH 5/7] Enhancement : Offline notification added (#1541) --- src/app/layout.tsx | 6 ++-- src/components/OfflineNavigator.tsx | 51 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 src/components/OfflineNavigator.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 4931b6ac4..f5198fcba 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -9,6 +9,7 @@ import { siteConfig } from '@/config/site-config'; import { Toaster } from 'sonner'; import { Navbar } from '@/components/Navbar'; import NextTopLoader from 'nextjs-toploader'; +import OfflineNotification from '@/components/OfflineNavigator'; const satoshi = localFont({ display: 'swap', @@ -33,11 +34,12 @@ export default function RootLayout({ children }: { children: ReactNode }) { )} > - + {children} diff --git a/src/components/OfflineNavigator.tsx b/src/components/OfflineNavigator.tsx new file mode 100644 index 000000000..0eb464f3c --- /dev/null +++ b/src/components/OfflineNavigator.tsx @@ -0,0 +1,51 @@ +'use client'; +import Image from 'next/image'; +import { useState, useEffect } from 'react'; + +const OfflineNotification = () => { + const [isOffline, setIsOffline] = useState(false); + const [mounted, setMounted] = useState(false); + + useEffect(() => { + setMounted(true); + setIsOffline(!window.navigator.onLine); + + const handleOnline = () => setIsOffline(false); + const handleOffline = () => setIsOffline(true); + + window.addEventListener('online', handleOnline); + window.addEventListener('offline', handleOffline); + + return () => { + window.removeEventListener('online', handleOnline); + window.removeEventListener('offline', handleOffline); + }; + }, []); + + if (!mounted) return null; + + if (!isOffline) return null; + + return ( +
+
+ Offline +

+ You are offline +

+

+ Please check your internet connection +

+
+
+ ); +}; + +export default OfflineNotification; \ No newline at end of file From 204c49667b386c29cc9699180adce5775c5df7dc Mon Sep 17 00:00:00 2001 From: Abdul Minhaz <75325495+MNZ02@users.noreply.github.com> Date: Tue, 12 Nov 2024 02:22:01 +0530 Subject: [PATCH 6/7] fix: ensure last item is visible --- src/components/Sidebar.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index c6ebfdf50..dec02c9ea 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -186,7 +186,7 @@ export function Sidebar({ ); return ( -
+
- + {memoizedContent} From 88bff9010d854eb2128acdd5fe9700168ba0ac17 Mon Sep 17 00:00:00 2001 From: Vansh Chopra <76000026+vanshavenger@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:02:08 +0530 Subject: [PATCH 7/7] fix: small minor errors (#1504) * FIX: Map keys error * FIX: Duplicate key error * FIx: Animate presewnce where it is needed --- src/components/BreadCrumbComponent.tsx | 6 ++-- src/components/Navbar.tsx | 44 ++++++++++++-------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/components/BreadCrumbComponent.tsx b/src/components/BreadCrumbComponent.tsx index 79b85842e..3dd3753e9 100644 --- a/src/components/BreadCrumbComponent.tsx +++ b/src/components/BreadCrumbComponent.tsx @@ -11,7 +11,7 @@ import { import { FullCourseContent } from '@/db/course'; import { Home } from 'lucide-react'; import Link from 'next/link'; -import { useMemo } from 'react'; +import { Fragment, useMemo } from 'react'; export default function BreadCrumbComponent({ rest, @@ -93,7 +93,7 @@ export default function BreadCrumbComponent({ finalRouteArray = [...rest]; } return ( - <> + {index !== array.length - 1 ? ( <> @@ -116,7 +116,7 @@ export default function BreadCrumbComponent({ )} - + ); })} diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index bc0bb781a..052a855c5 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -41,7 +41,7 @@ export const Navbar = () => { ); return ( - + <> {
{/* Mobile menu */} - {!session?.user && ( - <> - {isMenuOpen && ( + + {!session?.user && isMenuOpen && ( + - - + - + target="_blank" + > + Join now + + - )} - - )} + + )} + {/* Mobile search overlay */} @@ -195,6 +193,6 @@ export const Navbar = () => { )} - + ); };