From 9303a1ab76bc403e95b15248b4269c7e78ec362d Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 13:49:06 +0600 Subject: [PATCH 001/706] still costmuize /auth --- src/app/(dashboard)/layout.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/app/(dashboard)/layout.tsx diff --git a/src/app/(dashboard)/layout.tsx b/src/app/(dashboard)/layout.tsx new file mode 100644 index 0000000..1ecf4f9 --- /dev/null +++ b/src/app/(dashboard)/layout.tsx @@ -0,0 +1,13 @@ +'use client'; + +import { ReactNode } from 'react'; + +export default function DashBoardLayout({ children }: { children: ReactNode }) { + return ( +
+
+ {children} +
+
+ ); + } From ebe542452b2edb1c5b113779b4a76aa9701afd38 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 15:50:00 +0600 Subject: [PATCH 002/706] fixed bug --- middleware.ts | 7 +------ src/app/(dashboard)/(routes)/page.tsx | 11 ----------- src/app/(platform)/(dashboard)/(routes)/page.tsx | 11 +++++++++++ .../(platform)/(dashboard)/components/sidebar.tsx | 11 +++++++++++ src/app/{ => (platform)}/(dashboard)/layout.tsx | 6 +++++- src/app/(platform)/layout.tsx | 12 ++++++++++++ src/app/layout.tsx | 2 -- src/app/page.tsx | 15 --------------- src/app/test/page.tsx | 11 +++++++++++ 9 files changed, 51 insertions(+), 35 deletions(-) delete mode 100644 src/app/(dashboard)/(routes)/page.tsx create mode 100644 src/app/(platform)/(dashboard)/(routes)/page.tsx create mode 100644 src/app/(platform)/(dashboard)/components/sidebar.tsx rename src/app/{ => (platform)}/(dashboard)/layout.tsx (75%) create mode 100644 src/app/(platform)/layout.tsx delete mode 100644 src/app/page.tsx create mode 100644 src/app/test/page.tsx diff --git a/middleware.ts b/middleware.ts index 52fc335..3ead672 100644 --- a/middleware.ts +++ b/middleware.ts @@ -1,12 +1,7 @@ import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' -const isPublicRoute = createRouteMatcher(['/sign-in(.*)']) -export default clerkMiddleware(async (auth, request) => { - if (!isPublicRoute(request)) { - await auth.protect() - } -}) +export default clerkMiddleware(async (auth, request) => {}) export const config = { matcher: [ diff --git a/src/app/(dashboard)/(routes)/page.tsx b/src/app/(dashboard)/(routes)/page.tsx deleted file mode 100644 index b17ecd3..0000000 --- a/src/app/(dashboard)/(routes)/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ - -export default function Home () { - return ( -
- Home - -
- ); -}; - - diff --git a/src/app/(platform)/(dashboard)/(routes)/page.tsx b/src/app/(platform)/(dashboard)/(routes)/page.tsx new file mode 100644 index 0000000..e5b5e2b --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/page.tsx @@ -0,0 +1,11 @@ +'use client'; + + + +export default function Home() { + return ( +
+ +
+ ); +} diff --git a/src/app/(platform)/(dashboard)/components/sidebar.tsx b/src/app/(platform)/(dashboard)/components/sidebar.tsx new file mode 100644 index 0000000..b16d7b6 --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/sidebar.tsx @@ -0,0 +1,11 @@ +import {UserButton} from "@clerk/nextjs"; + +export default function Sidebar () { + return ( +
+ +
+ ); +}; + + diff --git a/src/app/(dashboard)/layout.tsx b/src/app/(platform)/(dashboard)/layout.tsx similarity index 75% rename from src/app/(dashboard)/layout.tsx rename to src/app/(platform)/(dashboard)/layout.tsx index 1ecf4f9..9be22fc 100644 --- a/src/app/(dashboard)/layout.tsx +++ b/src/app/(platform)/(dashboard)/layout.tsx @@ -1,13 +1,17 @@ 'use client'; import { ReactNode } from 'react'; +import Sidebar from "@/app/(platform)/(dashboard)/components/sidebar"; export default function DashBoardLayout({ children }: { children: ReactNode }) { return (
+
+ +
+ {children}
- ); } diff --git a/src/app/(platform)/layout.tsx b/src/app/(platform)/layout.tsx new file mode 100644 index 0000000..a36db05 --- /dev/null +++ b/src/app/(platform)/layout.tsx @@ -0,0 +1,12 @@ +import { ClerkProvider } from "@clerk/nextjs"; +import React from "react"; + +interface PlatformLayoutProps { + children: React.ReactNode; +} + +const PlatformLayout: React.FC = ({ children }) => { + return {children}; +}; + +export default PlatformLayout; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f8759f4..cdf8072 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -24,7 +24,6 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - @@ -32,6 +31,5 @@ export default function RootLayout({ - ); } diff --git a/src/app/page.tsx b/src/app/page.tsx deleted file mode 100644 index 2364de0..0000000 --- a/src/app/page.tsx +++ /dev/null @@ -1,15 +0,0 @@ -'use client'; - - - -import {Button} from "@/components/ui/button"; - -export default function Home() { - return ( -
-

Page

- - -
- ); -}; diff --git a/src/app/test/page.tsx b/src/app/test/page.tsx new file mode 100644 index 0000000..2d4a5e1 --- /dev/null +++ b/src/app/test/page.tsx @@ -0,0 +1,11 @@ + + export default function TestPage () { + return ( +
+ this should be un protected + +
+ ); +}; + + From cff723f9c3ab38ba82839baa45ffa03513fbcfce Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:13:47 +0600 Subject: [PATCH 003/706] sidebar creating --- src/app/(platform)/(dashboard)/(routes)/page.tsx | 4 +++- src/app/(platform)/(dashboard)/components/sidebar.tsx | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/page.tsx b/src/app/(platform)/(dashboard)/(routes)/page.tsx index e5b5e2b..82db341 100644 --- a/src/app/(platform)/(dashboard)/(routes)/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/page.tsx @@ -2,10 +2,12 @@ +import {UserButton} from "@clerk/nextjs"; + export default function Home() { return (
- +
); } diff --git a/src/app/(platform)/(dashboard)/components/sidebar.tsx b/src/app/(platform)/(dashboard)/components/sidebar.tsx index b16d7b6..390f152 100644 --- a/src/app/(platform)/(dashboard)/components/sidebar.tsx +++ b/src/app/(platform)/(dashboard)/components/sidebar.tsx @@ -1,9 +1,10 @@ -import {UserButton} from "@clerk/nextjs"; +// import {UserButton} from "@clerk/nextjs"; export default function Sidebar () { return ( -
- +
+ SideBar ! +{/**/}
); }; From ca8e05780d0e6b1b59244dcca544c2727c17d276 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:15:11 +0600 Subject: [PATCH 004/706] working !!! (hidden) --- src/app/(platform)/(dashboard)/components/sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/components/sidebar.tsx b/src/app/(platform)/(dashboard)/components/sidebar.tsx index 390f152..1c825d0 100644 --- a/src/app/(platform)/(dashboard)/components/sidebar.tsx +++ b/src/app/(platform)/(dashboard)/components/sidebar.tsx @@ -2,7 +2,7 @@ export default function Sidebar () { return ( -
+
SideBar ! {/**/}
From 7cf2dbf2d59503c2db854c3d49ae7ce695dbd50d Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:29:47 +0600 Subject: [PATCH 005/706] added logo/costumize --- public/file.svg | 1 - public/globe.svg | 1 - public/logoipsum-296 (1).svg | 1 + public/next.svg | 1 - public/vercel.svg | 1 - public/window.svg | 1 - src/app/(platform)/(dashboard)/components/logo.tsx | 12 ++++++++++++ .../(dashboard)/components/logoipsum-296.svg | 1 + .../(platform)/(dashboard)/components/sidebar.tsx | 8 ++++++-- 9 files changed, 20 insertions(+), 7 deletions(-) delete mode 100644 public/file.svg delete mode 100644 public/globe.svg create mode 100644 public/logoipsum-296 (1).svg delete mode 100644 public/next.svg delete mode 100644 public/vercel.svg delete mode 100644 public/window.svg create mode 100644 src/app/(platform)/(dashboard)/components/logo.tsx create mode 100644 src/app/(platform)/(dashboard)/components/logoipsum-296.svg diff --git a/public/file.svg b/public/file.svg deleted file mode 100644 index 004145c..0000000 --- a/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/globe.svg b/public/globe.svg deleted file mode 100644 index 567f17b..0000000 --- a/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/logoipsum-296 (1).svg b/public/logoipsum-296 (1).svg new file mode 100644 index 0000000..8048f74 --- /dev/null +++ b/public/logoipsum-296 (1).svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/next.svg b/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index 7705396..0000000 --- a/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/window.svg b/public/window.svg deleted file mode 100644 index b2b2a44..0000000 --- a/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/(platform)/(dashboard)/components/logo.tsx b/src/app/(platform)/(dashboard)/components/logo.tsx new file mode 100644 index 0000000..85aa36c --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/logo.tsx @@ -0,0 +1,12 @@ +import Image from "next/image"; +import logo from "./logoipsum-296.svg" +export default function Logo () { + return ( +
+ logo + +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/components/logoipsum-296.svg b/src/app/(platform)/(dashboard)/components/logoipsum-296.svg new file mode 100644 index 0000000..8048f74 --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/logoipsum-296.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/(platform)/(dashboard)/components/sidebar.tsx b/src/app/(platform)/(dashboard)/components/sidebar.tsx index 1c825d0..0e6ac79 100644 --- a/src/app/(platform)/(dashboard)/components/sidebar.tsx +++ b/src/app/(platform)/(dashboard)/components/sidebar.tsx @@ -1,10 +1,14 @@ -// import {UserButton} from "@clerk/nextjs"; +import Logo from "@/app/(platform)/(dashboard)/components/logo"; export default function Sidebar () { return (
+ +
+ + +
SideBar ! -{/**/}
); }; From 3591262796c5a787b42be7d389c4886ab18adc8b Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:33:14 +0600 Subject: [PATCH 006/706] new logo --- src/app/(platform)/(dashboard)/components/logo.tsx | 2 +- src/app/(platform)/(dashboard)/components/logoipsum-296.svg | 1 - src/app/(platform)/(dashboard)/components/logoipsum-297.svg | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 src/app/(platform)/(dashboard)/components/logoipsum-296.svg create mode 100644 src/app/(platform)/(dashboard)/components/logoipsum-297.svg diff --git a/src/app/(platform)/(dashboard)/components/logo.tsx b/src/app/(platform)/(dashboard)/components/logo.tsx index 85aa36c..aa0aac2 100644 --- a/src/app/(platform)/(dashboard)/components/logo.tsx +++ b/src/app/(platform)/(dashboard)/components/logo.tsx @@ -1,5 +1,5 @@ import Image from "next/image"; -import logo from "./logoipsum-296.svg" +import logo from "./logoipsum-297.svg" export default function Logo () { return (
diff --git a/src/app/(platform)/(dashboard)/components/logoipsum-296.svg b/src/app/(platform)/(dashboard)/components/logoipsum-296.svg deleted file mode 100644 index 8048f74..0000000 --- a/src/app/(platform)/(dashboard)/components/logoipsum-296.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/(platform)/(dashboard)/components/logoipsum-297.svg b/src/app/(platform)/(dashboard)/components/logoipsum-297.svg new file mode 100644 index 0000000..18550cd --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/logoipsum-297.svg @@ -0,0 +1 @@ + \ No newline at end of file From f2653c65cb39a093d2f1764d3bf788e07891124b Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:35:56 +0600 Subject: [PATCH 007/706] sidebarRoutes/sidebar --- .../(dashboard)/components/sidebar-routes.tsx | 11 +++++++++++ src/app/(platform)/(dashboard)/components/sidebar.tsx | 7 +++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/app/(platform)/(dashboard)/components/sidebar-routes.tsx diff --git a/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx b/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx new file mode 100644 index 0000000..62a3c41 --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx @@ -0,0 +1,11 @@ +'use client' +export default function SidebarRoutes () { + return ( +
+ sidebar-routes + +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/components/sidebar.tsx b/src/app/(platform)/(dashboard)/components/sidebar.tsx index 0e6ac79..5abf19a 100644 --- a/src/app/(platform)/(dashboard)/components/sidebar.tsx +++ b/src/app/(platform)/(dashboard)/components/sidebar.tsx @@ -1,14 +1,17 @@ import Logo from "@/app/(platform)/(dashboard)/components/logo"; +import SidebarRoutes from "@/app/(platform)/(dashboard)/components/sidebar-routes"; export default function Sidebar () { return ( +
- +
+
+
- SideBar !
); }; From 5ff9120ed855af69fd92e5a12b057d7abc239f0d Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:38:57 +0600 Subject: [PATCH 008/706] costumize a sidebar Routes --- .../(dashboard)/components/sidebar-routes.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx b/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx index 62a3c41..7975b1c 100644 --- a/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx +++ b/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx @@ -1,7 +1,24 @@ 'use client' +import {Compass, Layout} from "lucide-react"; + +const guestRoutes = [ + { + icon: Layout, + label: 'Dashboard', + href: '/', + } , + { + icon: Compass, + label: 'Browse', + href: '/search', + } +] + export default function SidebarRoutes () { + const router = guestRoutes;`` + return ( -
+
sidebar-routes
From aada434f37b2af26fd4caff9f619e881f290ffa2 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:48:25 +0600 Subject: [PATCH 009/706] addedd SideBarItem/customize-icon-route --- .../(dashboard)/components/side-bar-item.tsx | 11 +++++++++++ .../(dashboard)/components/sidebar-routes.tsx | 13 +++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/app/(platform)/(dashboard)/components/side-bar-item.tsx diff --git a/src/app/(platform)/(dashboard)/components/side-bar-item.tsx b/src/app/(platform)/(dashboard)/components/side-bar-item.tsx new file mode 100644 index 0000000..3f58517 --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/side-bar-item.tsx @@ -0,0 +1,11 @@ +'use client' +export default function SideBarItem () { + return ( +
+ SideBarItem + +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx b/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx index 7975b1c..e322d35 100644 --- a/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx +++ b/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx @@ -1,5 +1,6 @@ 'use client' import {Compass, Layout} from "lucide-react"; +import SideBarItem from "@/app/(platform)/(dashboard)/components/side-bar-item"; const guestRoutes = [ { @@ -15,11 +16,19 @@ const guestRoutes = [ ] export default function SidebarRoutes () { - const router = guestRoutes;`` + const routes = guestRoutes; return (
- sidebar-routes + {routes.map((route) => ( + + + )}
); From b3d7f02b7ede341ac4ff6596ea0abc27adf934ac Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:52:20 +0600 Subject: [PATCH 010/706] sidebaritem creating --- .../components/{sidebar.tsx => SideBar.tsx} | 6 +++--- .../(dashboard)/components/SideBarItem.tsx | 21 +++++++++++++++++++ .../{sidebar-routes.tsx => SideBarRoutes.tsx} | 4 ++-- .../(dashboard)/components/side-bar-item.tsx | 11 ---------- src/app/(platform)/(dashboard)/layout.tsx | 4 ++-- 5 files changed, 28 insertions(+), 18 deletions(-) rename src/app/(platform)/(dashboard)/components/{sidebar.tsx => SideBar.tsx} (67%) create mode 100644 src/app/(platform)/(dashboard)/components/SideBarItem.tsx rename src/app/(platform)/(dashboard)/components/{sidebar-routes.tsx => SideBarRoutes.tsx} (91%) delete mode 100644 src/app/(platform)/(dashboard)/components/side-bar-item.tsx diff --git a/src/app/(platform)/(dashboard)/components/sidebar.tsx b/src/app/(platform)/(dashboard)/components/SideBar.tsx similarity index 67% rename from src/app/(platform)/(dashboard)/components/sidebar.tsx rename to src/app/(platform)/(dashboard)/components/SideBar.tsx index 5abf19a..de1a413 100644 --- a/src/app/(platform)/(dashboard)/components/sidebar.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBar.tsx @@ -1,7 +1,7 @@ import Logo from "@/app/(platform)/(dashboard)/components/logo"; -import SidebarRoutes from "@/app/(platform)/(dashboard)/components/sidebar-routes"; +import SideBarRoutes from "@/app/(platform)/(dashboard)/components/SideBarRoutes"; -export default function Sidebar () { +export default function SideBar () { return (
@@ -10,7 +10,7 @@ export default function Sidebar () {
- +
); diff --git a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx new file mode 100644 index 0000000..eb4c8d4 --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx @@ -0,0 +1,21 @@ +'use client' + +import {LucideIcon} from "lucide-react"; + +interface SideBarItemProps { + icon: LucideIcon, + label: string, + href: string, + +} + +export default function SideBarItem () { + return ( +
+ SideBarItem + +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx similarity index 91% rename from src/app/(platform)/(dashboard)/components/sidebar-routes.tsx rename to src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx index e322d35..1f1caa0 100644 --- a/src/app/(platform)/(dashboard)/components/sidebar-routes.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx @@ -1,6 +1,6 @@ 'use client' import {Compass, Layout} from "lucide-react"; -import SideBarItem from "@/app/(platform)/(dashboard)/components/side-bar-item"; +import SideBarItem from "@/app/(platform)/(dashboard)/components/SideBarItem"; const guestRoutes = [ { @@ -15,7 +15,7 @@ const guestRoutes = [ } ] -export default function SidebarRoutes () { +export default function SideBarRoutes () { const routes = guestRoutes; return ( diff --git a/src/app/(platform)/(dashboard)/components/side-bar-item.tsx b/src/app/(platform)/(dashboard)/components/side-bar-item.tsx deleted file mode 100644 index 3f58517..0000000 --- a/src/app/(platform)/(dashboard)/components/side-bar-item.tsx +++ /dev/null @@ -1,11 +0,0 @@ -'use client' -export default function SideBarItem () { - return ( -
- SideBarItem - -
- ); -}; - - diff --git a/src/app/(platform)/(dashboard)/layout.tsx b/src/app/(platform)/(dashboard)/layout.tsx index 9be22fc..9a3e246 100644 --- a/src/app/(platform)/(dashboard)/layout.tsx +++ b/src/app/(platform)/(dashboard)/layout.tsx @@ -1,14 +1,14 @@ 'use client'; import { ReactNode } from 'react'; -import Sidebar from "@/app/(platform)/(dashboard)/components/sidebar"; +import SideBar from "@/app/(platform)/(dashboard)/components/SideBar"; export default function DashBoardLayout({ children }: { children: ReactNode }) { return (
- +
{children} From 274666f3719e2149655f067629654be8f2387104 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 21:56:16 +0600 Subject: [PATCH 011/706] types/icon=sidebaritem --- src/app/(platform)/(dashboard)/components/SideBarItem.tsx | 2 +- src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx index eb4c8d4..7990bf4 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx @@ -9,7 +9,7 @@ interface SideBarItemProps { } -export default function SideBarItem () { +export default function SideBarItem ({icon,label,href}: SideBarItemProps) { return (
SideBarItem diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx index 1f1caa0..a51c480 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx @@ -12,7 +12,7 @@ const guestRoutes = [ icon: Compass, label: 'Browse', href: '/search', - } + }, ] export default function SideBarRoutes () { @@ -28,8 +28,7 @@ export default function SideBarRoutes () { href={route.href} /> - )} - + ))}
); }; From b3c50529b1c1d58d9f88770c3931a4b0305eaafa Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 22:16:29 +0600 Subject: [PATCH 012/706] adding style for sidebaritem --- .../(dashboard)/components/SideBarItem.tsx | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx index 7990bf4..9ecfeeb 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx @@ -1,6 +1,8 @@ 'use client' import {LucideIcon} from "lucide-react"; +import {usePathname, useRouter} from "next/navigation"; +import {cn} from "@/lib/utils"; interface SideBarItemProps { icon: LucideIcon, @@ -9,12 +11,23 @@ interface SideBarItemProps { } -export default function SideBarItem ({icon,label,href}: SideBarItemProps) { +export default function SideBarItem ({icon: Icon,label,href}: SideBarItemProps) { + const pathname = usePathname(); + const router = useRouter(); + + const isActive = (pathname === '/' && href === '/') || pathname?.startsWith(`${href}/`); +const onClick = () => { + router.push(href); +} + return ( -
- SideBarItem - + ); }; From 6206651db93bec1b6cef6e1221dc37b17e633552 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 22:18:25 +0600 Subject: [PATCH 013/706] checking how it s look --- src/app/(platform)/(dashboard)/components/SideBarItem.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx index 9ecfeeb..e0f6f43 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx @@ -23,7 +23,11 @@ const onClick = () => { return (
- +
); }; From b7cf828cd33e7cd38f8602dadf1cfcc9b5b60df4 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 22:25:06 +0600 Subject: [PATCH 015/706] still added --- src/app/(platform)/(dashboard)/components/SideBarItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx index 24a0660..e4a05b0 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx @@ -30,7 +30,7 @@ const onClick = () => { {label}
-
+
); }; From ec39befcce53c5d83b8d357768846e0aca495999 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 22:26:39 +0600 Subject: [PATCH 016/706] search page changing --- .../(platform)/(dashboard)/(routes)/search/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/app/(platform)/(dashboard)/(routes)/search/page.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/search/page.tsx b/src/app/(platform)/(dashboard)/(routes)/search/page.tsx new file mode 100644 index 0000000..11e0091 --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/search/page.tsx @@ -0,0 +1,11 @@ +'use client' +export default function page () { + return ( +
+ page + +
+ ); +}; + + From 667a9f1a8b43bc6745e25cc9061ac0f4a976d066 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 22:28:41 +0600 Subject: [PATCH 017/706] fixing some bugging --- .../(platform)/(dashboard)/(routes)/search/page.tsx | 4 ++-- src/app/(platform)/layout.tsx | 12 ------------ src/app/layout.tsx | 3 +++ 3 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 src/app/(platform)/layout.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/search/page.tsx b/src/app/(platform)/(dashboard)/(routes)/search/page.tsx index 11e0091..e27bafe 100644 --- a/src/app/(platform)/(dashboard)/(routes)/search/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/search/page.tsx @@ -1,8 +1,8 @@ 'use client' -export default function page () { +export default function SearchPage () { return (
- page + SearchPage
); diff --git a/src/app/(platform)/layout.tsx b/src/app/(platform)/layout.tsx deleted file mode 100644 index a36db05..0000000 --- a/src/app/(platform)/layout.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { ClerkProvider } from "@clerk/nextjs"; -import React from "react"; - -interface PlatformLayoutProps { - children: React.ReactNode; -} - -const PlatformLayout: React.FC = ({ children }) => { - return {children}; -}; - -export default PlatformLayout; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index cdf8072..e09daa9 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -24,6 +24,8 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( + + @@ -31,5 +33,6 @@ export default function RootLayout({ + ); } From 0f0cafd12ddc8c0ffcae9f23d122226dc0bc9fb7 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 22:31:37 +0600 Subject: [PATCH 018/706] fixing --- src/app/(platform)/(dashboard)/components/SideBarItem.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx index e4a05b0..c96d811 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx @@ -28,9 +28,8 @@ const onClick = () => { className={cn('text-slate-500', isActive && 'text-sky-700')} /> {label} -
-
+
); }; From 445b3ae6bcb9a71a5945df6024ad9ee0295c6f26 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 22:36:34 +0600 Subject: [PATCH 019/706] fixed some bugging --- src/app/(platform)/(dashboard)/components/SideBarItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx index c96d811..a98292c 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx @@ -15,7 +15,7 @@ export default function SideBarItem ({icon: Icon,label,href}: SideBarItemProps) const pathname = usePathname(); const router = useRouter(); - const isActive = (pathname === '/' && href === '/') || pathname?.startsWith(`${href}/`); + const isActive = (pathname === '/' && href === '/') || pathname === href || pathname?.startsWith(`${href}/`); const onClick = () => { router.push(href); } From 0c14d5014af3261c1263346a75fe734fd3bfa758 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 22:39:16 +0600 Subject: [PATCH 020/706] added yet+ 2 section --- .../(dashboard)/components/SideBarRoutes.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx index a51c480..202dcec 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx @@ -8,6 +8,24 @@ const guestRoutes = [ label: 'Dashboard', href: '/', } , + { + icon: Compass, + label: 'Browse', + href: '/search', + }, { + icon: Layout, + label: 'Dashboard', + href: '/', + } , + { + icon: Compass, + label: 'Browse', + href: '/search', + }, { + icon: Layout, + label: 'Dashboard', + href: '/', + } , { icon: Compass, label: 'Browse', From 886ab9dd26d63575a3df88d3a2eaeca32c92aca9 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:14:45 +0600 Subject: [PATCH 021/706] changed layout for sidebar --- src/app/(platform)/(dashboard)/layout.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/(platform)/(dashboard)/layout.tsx b/src/app/(platform)/(dashboard)/layout.tsx index 9a3e246..ebd8e8d 100644 --- a/src/app/(platform)/(dashboard)/layout.tsx +++ b/src/app/(platform)/(dashboard)/layout.tsx @@ -10,8 +10,10 @@ export default function DashBoardLayout({ children }: { children: ReactNode }) {
+
{children} +
); } From f7084192d9b3ed0f77c87c83495e8dd357dd4934 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:17:39 +0600 Subject: [PATCH 022/706] customizing navbar section --- .../(dashboard)/components/Navbar.tsx | 11 +++++++++++ .../(dashboard)/components/SideBarRoutes.tsx | 18 ------------------ src/app/(platform)/(dashboard)/layout.tsx | 4 +++- 3 files changed, 14 insertions(+), 19 deletions(-) create mode 100644 src/app/(platform)/(dashboard)/components/Navbar.tsx diff --git a/src/app/(platform)/(dashboard)/components/Navbar.tsx b/src/app/(platform)/(dashboard)/components/Navbar.tsx new file mode 100644 index 0000000..5ebe715 --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/Navbar.tsx @@ -0,0 +1,11 @@ +'use client' +export default function Navbar () { + return ( +
+ Navbar + +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx index 202dcec..a51c480 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx @@ -8,24 +8,6 @@ const guestRoutes = [ label: 'Dashboard', href: '/', } , - { - icon: Compass, - label: 'Browse', - href: '/search', - }, { - icon: Layout, - label: 'Dashboard', - href: '/', - } , - { - icon: Compass, - label: 'Browse', - href: '/search', - }, { - icon: Layout, - label: 'Dashboard', - href: '/', - } , { icon: Compass, label: 'Browse', diff --git a/src/app/(platform)/(dashboard)/layout.tsx b/src/app/(platform)/(dashboard)/layout.tsx index ebd8e8d..2b086ad 100644 --- a/src/app/(platform)/(dashboard)/layout.tsx +++ b/src/app/(platform)/(dashboard)/layout.tsx @@ -6,7 +6,9 @@ import SideBar from "@/app/(platform)/(dashboard)/components/SideBar"; export default function DashBoardLayout({ children }: { children: ReactNode }) { return (
- +
+ +
From 9f83ad54f7b513912a2bfceb2ab6e886bd4fa311 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:18:57 +0600 Subject: [PATCH 023/706] still custmozing navbar --- src/app/(platform)/(dashboard)/components/Navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/components/Navbar.tsx b/src/app/(platform)/(dashboard)/components/Navbar.tsx index 5ebe715..677b0af 100644 --- a/src/app/(platform)/(dashboard)/components/Navbar.tsx +++ b/src/app/(platform)/(dashboard)/components/Navbar.tsx @@ -1,7 +1,7 @@ 'use client' export default function Navbar () { return ( -
+
Navbar
From 6bea37827d517cdbd3e2f677a69a1877365823b8 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:21:39 +0600 Subject: [PATCH 024/706] added MobileNavbar section --- .../(dashboard)/components/MobileNavbar.tsx | 12 ++++++++++++ src/app/(platform)/(dashboard)/components/Navbar.tsx | 6 ++++-- src/app/(platform)/(dashboard)/layout.tsx | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 src/app/(platform)/(dashboard)/components/MobileNavbar.tsx diff --git a/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx b/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx new file mode 100644 index 0000000..8937101 --- /dev/null +++ b/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx @@ -0,0 +1,12 @@ +'use client' +import {Menu} from "lucide-react"; + +export default function MobileNavbar () { + return ( +
+ +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/components/Navbar.tsx b/src/app/(platform)/(dashboard)/components/Navbar.tsx index 677b0af..64a91bf 100644 --- a/src/app/(platform)/(dashboard)/components/Navbar.tsx +++ b/src/app/(platform)/(dashboard)/components/Navbar.tsx @@ -1,9 +1,11 @@ 'use client' +import MobileNavbar from "@/app/(platform)/(dashboard)/components/MobileNavbar"; + export default function Navbar () { return (
- Navbar - + +
); }; diff --git a/src/app/(platform)/(dashboard)/layout.tsx b/src/app/(platform)/(dashboard)/layout.tsx index 2b086ad..042c943 100644 --- a/src/app/(platform)/(dashboard)/layout.tsx +++ b/src/app/(platform)/(dashboard)/layout.tsx @@ -2,6 +2,7 @@ import { ReactNode } from 'react'; import SideBar from "@/app/(platform)/(dashboard)/components/SideBar"; +import Navbar from "@/app/(platform)/(dashboard)/components/Navbar"; export default function DashBoardLayout({ children }: { children: ReactNode }) { return ( From 291ef1d8a0bad7391f14a2f2ab8e680979444963 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:24:50 +0600 Subject: [PATCH 025/706] custmozie mobileNavbar --- package-lock.json | 421 +++++++++++++++++- package.json | 1 + .../(dashboard)/components/MobileNavbar.tsx | 7 + src/components/ui/sheet.tsx | 140 ++++++ 4 files changed, 568 insertions(+), 1 deletion(-) create mode 100644 src/components/ui/sheet.tsx diff --git a/package-lock.json b/package-lock.json index 03b4479..af533f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "dependencies": { "@clerk/nextjs": "^6.11.0", + "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-slot": "^1.1.1", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -778,6 +779,12 @@ "node": ">=14" } }, + "node_modules/@radix-ui/primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.1.tgz", + "integrity": "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==", + "license": "MIT" + }, "node_modules/@radix-ui/react-compose-refs": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", @@ -793,6 +800,213 @@ } } }, + "node_modules/@radix-ui/react-context": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.1.tgz", + "integrity": "sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.5.tgz", + "integrity": "sha512-LaO3e5h/NOEL4OfXjxD43k9Dx+vn+8n+PCFt6uhX/BADFflllyv3WJG6rgvvSVBxpTch938Qq/LGc2MMxipXPw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-dismissable-layer": "1.1.4", + "@radix-ui/react-focus-guards": "1.1.1", + "@radix-ui/react-focus-scope": "1.1.1", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.3", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.1", + "@radix-ui/react-slot": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.1.0", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dismissable-layer": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.4.tgz", + "integrity": "sha512-XDUI0IVYVSwjMXxM6P4Dfti7AH+Y4oS/TB+sglZ/EXc7cqLwGAmp1NlMrcUjj7ks6R5WTZuWKv44FBbLpwU3sA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-primitive": "2.0.1", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-guards": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz", + "integrity": "sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-scope": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.1.tgz", + "integrity": "sha512-01omzJAYRxXdG2/he/+xy+c8a8gCydoQ1yOxnWNcRhrrBW5W+RQJ22EK1SaO8tb3WoUsuEw7mJjBozPzihDFjA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-primitive": "2.0.1", + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-id": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-portal": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.3.tgz", + "integrity": "sha512-NciRqhXnGojhT93RPyDaMPfLH3ZSl4jjIFbZQ1b/vxvZEdHsBZ49wP9w8L3HzUQwep01LcWtkUvm0OVB5JAHTw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.1", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-presence": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.2.tgz", + "integrity": "sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-primitive": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.1.tgz", + "integrity": "sha512-sHCWTtxwNn3L3fH8qAfnF3WbUZycW93SM1j3NFDzXBiz8D6F5UTTy8G1+WFEaiCdvCVRJWj6N2R4Xq6HdiHmDg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-slot": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-slot": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.1.tgz", @@ -811,6 +1025,72 @@ } } }, + "node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-escape-keydown": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@swc/counter": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", @@ -850,7 +1130,7 @@ "version": "19.0.3", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.0.3.tgz", "integrity": "sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==", - "dev": true, + "devOptional": true, "license": "MIT", "peerDependencies": { "@types/react": "^19.0.0" @@ -905,6 +1185,18 @@ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", "license": "MIT" }, + "node_modules/aria-hidden": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", + "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1166,6 +1458,12 @@ "node": ">=8" } }, + "node_modules/detect-node-es": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", + "license": "MIT" + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -1288,6 +1586,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-nonce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", + "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", @@ -1955,6 +2262,75 @@ "react": "^19.0.0" } }, + "node_modules/react-remove-scroll": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", + "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==", + "license": "MIT", + "dependencies": { + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-remove-scroll-bar": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz", + "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==", + "license": "MIT", + "dependencies": { + "react-style-singleton": "^2.2.2", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-style-singleton": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz", + "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==", + "license": "MIT", + "dependencies": { + "get-nonce": "^1.0.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -2484,6 +2860,49 @@ "dev": true, "license": "MIT" }, + "node_modules/use-callback-ref": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", + "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-sidecar": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz", + "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==", + "license": "MIT", + "dependencies": { + "detect-node-es": "^1.1.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/use-sync-external-store": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz", diff --git a/package.json b/package.json index 22f1337..bd24091 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "@clerk/nextjs": "^6.11.0", + "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-slot": "^1.1.1", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", diff --git a/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx b/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx index 8937101..00f99c5 100644 --- a/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx +++ b/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx @@ -1,11 +1,18 @@ 'use client' import {Menu} from "lucide-react"; +import {Sheet, SheetTrigger} from "@/components/ui/sheet"; export default function MobileNavbar () { return ( + + + +
+
+
); }; diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx new file mode 100644 index 0000000..a37f17b --- /dev/null +++ b/src/components/ui/sheet.tsx @@ -0,0 +1,140 @@ +"use client" + +import * as React from "react" +import * as SheetPrimitive from "@radix-ui/react-dialog" +import { cva, type VariantProps } from "class-variance-authority" +import { X } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Sheet = SheetPrimitive.Root + +const SheetTrigger = SheetPrimitive.Trigger + +const SheetClose = SheetPrimitive.Close + +const SheetPortal = SheetPrimitive.Portal + +const SheetOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetOverlay.displayName = SheetPrimitive.Overlay.displayName + +const sheetVariants = cva( + "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", + { + variants: { + side: { + top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", + bottom: + "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", + left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", + right: + "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", + }, + }, + defaultVariants: { + side: "right", + }, + } +) + +interface SheetContentProps + extends React.ComponentPropsWithoutRef, + VariantProps {} + +const SheetContent = React.forwardRef< + React.ElementRef, + SheetContentProps +>(({ side = "right", className, children, ...props }, ref) => ( + + + + {children} + + + Close + + + +)) +SheetContent.displayName = SheetPrimitive.Content.displayName + +const SheetHeader = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +SheetHeader.displayName = "SheetHeader" + +const SheetFooter = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +SheetFooter.displayName = "SheetFooter" + +const SheetTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetTitle.displayName = SheetPrimitive.Title.displayName + +const SheetDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetDescription.displayName = SheetPrimitive.Description.displayName + +export { + Sheet, + SheetPortal, + SheetOverlay, + SheetTrigger, + SheetClose, + SheetContent, + SheetHeader, + SheetFooter, + SheetTitle, + SheetDescription, +} From 0b008bf7806f7175d6d70b24db5571be075a413f Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:26:15 +0600 Subject: [PATCH 026/706] still creating --- src/app/(platform)/(dashboard)/components/MobileNavbar.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx b/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx index 00f99c5..d1b5081 100644 --- a/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx +++ b/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx @@ -1,6 +1,7 @@ 'use client' import {Menu} from "lucide-react"; -import {Sheet, SheetTrigger} from "@/components/ui/sheet"; +import {Sheet, SheetContent, SheetTrigger} from "@/components/ui/sheet"; +import SideBar from "@/app/(platform)/(dashboard)/components/SideBar"; export default function MobileNavbar () { return ( @@ -12,6 +13,9 @@ export default function MobileNavbar () {
+ + + ); }; From 24e6f79b210df2acae0dbf8c60ef5e2fa866278e Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:30:38 +0600 Subject: [PATCH 027/706] fixing mobile-side-bar --- .../components/{MobileNavbar.tsx => MobileSidebar.tsx} | 4 ++-- src/app/(platform)/(dashboard)/components/Navbar.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/app/(platform)/(dashboard)/components/{MobileNavbar.tsx => MobileSidebar.tsx} (77%) diff --git a/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx b/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx similarity index 77% rename from src/app/(platform)/(dashboard)/components/MobileNavbar.tsx rename to src/app/(platform)/(dashboard)/components/MobileSidebar.tsx index d1b5081..0fe3b22 100644 --- a/src/app/(platform)/(dashboard)/components/MobileNavbar.tsx +++ b/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx @@ -3,11 +3,11 @@ import {Menu} from "lucide-react"; import {Sheet, SheetContent, SheetTrigger} from "@/components/ui/sheet"; import SideBar from "@/app/(platform)/(dashboard)/components/SideBar"; -export default function MobileNavbar () { +export default function MobileSidebar () { return ( - +
diff --git a/src/app/(platform)/(dashboard)/components/Navbar.tsx b/src/app/(platform)/(dashboard)/components/Navbar.tsx index 64a91bf..0ee8dc8 100644 --- a/src/app/(platform)/(dashboard)/components/Navbar.tsx +++ b/src/app/(platform)/(dashboard)/components/Navbar.tsx @@ -1,10 +1,10 @@ 'use client' -import MobileNavbar from "@/app/(platform)/(dashboard)/components/MobileNavbar"; +import MobileSidebar from "@/app/(platform)/(dashboard)/components/MobileSidebar"; export default function Navbar () { return (
- +
); From 7c46d0ef28865e68bf8265a27ffbfaf95cbf7d54 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:40:52 +0600 Subject: [PATCH 028/706] added NavbarRoutes --- .../(dashboard)/components/MobileSidebar.tsx | 2 +- .../(platform)/(dashboard)/components/Navbar.tsx | 2 ++ src/components/NavbarRoutes.tsx | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/components/NavbarRoutes.tsx diff --git a/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx b/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx index 0fe3b22..ac75919 100644 --- a/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx +++ b/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx @@ -13,7 +13,7 @@ export default function MobileSidebar () {
- +
diff --git a/src/app/(platform)/(dashboard)/components/Navbar.tsx b/src/app/(platform)/(dashboard)/components/Navbar.tsx index 0ee8dc8..7f4905e 100644 --- a/src/app/(platform)/(dashboard)/components/Navbar.tsx +++ b/src/app/(platform)/(dashboard)/components/Navbar.tsx @@ -1,10 +1,12 @@ 'use client' import MobileSidebar from "@/app/(platform)/(dashboard)/components/MobileSidebar"; +import NavbarRoutes from "@/components/NavbarRoutes"; export default function Navbar () { return (
+
); diff --git a/src/components/NavbarRoutes.tsx b/src/components/NavbarRoutes.tsx new file mode 100644 index 0000000..c205a63 --- /dev/null +++ b/src/components/NavbarRoutes.tsx @@ -0,0 +1,14 @@ +'use client' +import {UserButton} from "@clerk/nextjs"; + +export default function NavbarRoutes () { + return ( +
+ + NavbarRoutes + +
+ ); +}; + + From d683b049d6e321b0a33c1ab1854bd7dfce08ac03 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Tue, 4 Feb 2025 23:45:14 +0600 Subject: [PATCH 029/706] customizing a navigation for chapter and teacher page --- src/components/NavbarRoutes.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/NavbarRoutes.tsx b/src/components/NavbarRoutes.tsx index c205a63..f7f0df8 100644 --- a/src/components/NavbarRoutes.tsx +++ b/src/components/NavbarRoutes.tsx @@ -1,11 +1,18 @@ 'use client' import {UserButton} from "@clerk/nextjs"; +import {usePathname, useRouter} from "next/navigation"; export default function NavbarRoutes () { + const pathname = usePathname() + const router = useRouter(); + + const isTeacherPage = pathname.startsWith("/teacher"); + const isPlayerPage = pathname?.includes("/chapter"); + return (
- NavbarRoutes +
); From 1aa57ad948a551e52b3ccdc087f1c7ec26d343e4 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 00:51:47 +0600 Subject: [PATCH 030/706] added new route for definitily chapter --- .../(dashboard)/components/SideBarItem.tsx | 2 +- .../(dashboard)/components/SideBarRoutes.tsx | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx index a98292c..b3e5d0b 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarItem.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarItem.tsx @@ -15,7 +15,7 @@ export default function SideBarItem ({icon: Icon,label,href}: SideBarItemProps) const pathname = usePathname(); const router = useRouter(); - const isActive = (pathname === '/' && href === '/') || pathname === href || pathname?.startsWith(`${href}/`); + const isActive = (pathname === '/' && href === '/') || pathname === href || pathname?.startsWith(`${href}/`); const onClick = () => { router.push(href); } diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx index a51c480..2bada3e 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx @@ -12,6 +12,18 @@ const guestRoutes = [ icon: Compass, label: 'Browse', href: '/search', + }, { + icon: Compass, + label: 'Browse', + href: '/', + }, { + icon: Compass, + label: 'Browse', + href: '/', + }, { + icon: Compass, + label: 'Browse', + href: '/', }, ] From 5bea17dd7d7d389882b2fbb4bef69b2ba3ad2eb8 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 00:58:46 +0600 Subject: [PATCH 031/706] added new feature for idea --- .../(dashboard)/(routes)/settings/page.tsx | 0 .../(dashboard)/components/SideBarRoutes.tsx | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 src/app/(platform)/(dashboard)/(routes)/settings/page.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx b/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx index 2bada3e..988d9db 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx @@ -14,16 +14,16 @@ const guestRoutes = [ href: '/search', }, { icon: Compass, - label: 'Browse', - href: '/', + label: 'Settings', + href: '/settings', }, { icon: Compass, - label: 'Browse', - href: '/', + label: 'Think', + href: '/think', }, { icon: Compass, - label: 'Browse', - href: '/', + label: 'What', + href: '/what', }, ] From 63b6b9c8bf6491115c7ba1b0b240361f9acb28b8 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 00:59:44 +0600 Subject: [PATCH 032/706] added new file --- .../(platform)/(dashboard)/(routes)/settings/page.tsx | 11 +++++++++++ .../(platform)/(dashboard)/(routes)/think/page.tsx | 11 +++++++++++ src/app/(platform)/(dashboard)/(routes)/what/page.tsx | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 src/app/(platform)/(dashboard)/(routes)/think/page.tsx create mode 100644 src/app/(platform)/(dashboard)/(routes)/what/page.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx b/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx index e69de29..11e0091 100644 --- a/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx @@ -0,0 +1,11 @@ +'use client' +export default function page () { + return ( +
+ page + +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/(routes)/think/page.tsx b/src/app/(platform)/(dashboard)/(routes)/think/page.tsx new file mode 100644 index 0000000..70bced6 --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/think/page.tsx @@ -0,0 +1,11 @@ +'use client' +export default function Think () { + return ( +
+ Think + +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/(routes)/what/page.tsx b/src/app/(platform)/(dashboard)/(routes)/what/page.tsx new file mode 100644 index 0000000..8d0cffd --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/what/page.tsx @@ -0,0 +1,11 @@ +'use client' +export default function What () { + return ( +
+ What + +
+ ); +}; + + From 606d21eddf592f7f912a2d9bae815bb324bfdcbe Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 01:02:03 +0600 Subject: [PATCH 033/706] Your commit message --- src/app/(platform)/(dashboard)/(routes)/settings/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx b/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx index 11e0091..2ddde64 100644 --- a/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/settings/page.tsx @@ -1,8 +1,8 @@ 'use client' -export default function page () { +export default function Settings () { return (
- page + Settings
); From c2701ce2917da643c826f4c20e024c47bc02a0fa Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 01:27:54 +0600 Subject: [PATCH 034/706] fix mobile sidebar --- package-lock.json | 24 ++++++++++++ package.json | 1 + .../(dashboard)/components/MobileSidebar.tsx | 39 ++++++++++--------- 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index af533f6..bae2f01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@clerk/nextjs": "^6.11.0", "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-slot": "^1.1.1", + "@radix-ui/react-visually-hidden": "^1.1.1", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.474.0", @@ -1091,6 +1092,29 @@ } } }, + "node_modules/@radix-ui/react-visually-hidden": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.1.tgz", + "integrity": "sha512-vVfA2IZ9q/J+gEamvj761Oq1FpWgCDaNOOIfbPVp2MVPLEomUr5+Vf7kJGwQ24YxZSlQVar7Bes8kyTo5Dshpg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@swc/counter": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", diff --git a/package.json b/package.json index bd24091..4e7a665 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@clerk/nextjs": "^6.11.0", "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-slot": "^1.1.1", + "@radix-ui/react-visually-hidden": "^1.1.1", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.474.0", diff --git a/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx b/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx index ac75919..2866928 100644 --- a/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx +++ b/src/app/(platform)/(dashboard)/components/MobileSidebar.tsx @@ -1,23 +1,24 @@ 'use client' -import {Menu} from "lucide-react"; -import {Sheet, SheetContent, SheetTrigger} from "@/components/ui/sheet"; +import { Menu } from "lucide-react"; +import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"; +import { Dialog, DialogContent, DialogTitle, DialogDescription } from "@radix-ui/react-dialog"; // добавляем компоненты из Radix UI import SideBar from "@/app/(platform)/(dashboard)/components/SideBar"; -export default function MobileSidebar () { - return ( - - - - -
- -
-
- - - -
- ); +export default function MobileSidebar() { + return ( + + + +
+ +
+
+ + + + + +
+
+ ); }; - - From f593948c3707a66255e91a2795d46c6533e33381 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 01:39:40 +0600 Subject: [PATCH 035/706] customize navbar routes --- src/components/NavbarRoutes.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/NavbarRoutes.tsx b/src/components/NavbarRoutes.tsx index f7f0df8..adc59b8 100644 --- a/src/components/NavbarRoutes.tsx +++ b/src/components/NavbarRoutes.tsx @@ -1,6 +1,8 @@ 'use client' import {UserButton} from "@clerk/nextjs"; import {usePathname, useRouter} from "next/navigation"; +import {Button} from "@/components/ui/button"; +import {LogOut} from "lucide-react"; export default function NavbarRoutes () { const pathname = usePathname() @@ -11,6 +13,17 @@ export default function NavbarRoutes () { return (
+ { + isTeacherPage || isPlayerPage ? ( + + + ) + + } + From 34cc3bebc74b497ddefcd090876f4353f6e75ea3 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 01:43:02 +0600 Subject: [PATCH 036/706] navbar routes --- src/components/NavbarRoutes.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/NavbarRoutes.tsx b/src/components/NavbarRoutes.tsx index adc59b8..965b3e2 100644 --- a/src/components/NavbarRoutes.tsx +++ b/src/components/NavbarRoutes.tsx @@ -3,9 +3,10 @@ import {UserButton} from "@clerk/nextjs"; import {usePathname, useRouter} from "next/navigation"; import {Button} from "@/components/ui/button"; import {LogOut} from "lucide-react"; +import Link from "next/link"; export default function NavbarRoutes () { - const pathname = usePathname() + const pathname = usePathname(); const router = useRouter(); const isTeacherPage = pathname.startsWith("/teacher"); @@ -19,14 +20,14 @@ export default function NavbarRoutes () { Exit - - ) - - } - + ) :( + + + + )} - -
); }; From a8582a4e68153028c59e59559b0e2d242551aba2 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 01:44:29 +0600 Subject: [PATCH 037/706] teach mode on navbar routes for sidebar || navbar --- src/components/NavbarRoutes.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/NavbarRoutes.tsx b/src/components/NavbarRoutes.tsx index 965b3e2..f8742c2 100644 --- a/src/components/NavbarRoutes.tsx +++ b/src/components/NavbarRoutes.tsx @@ -16,13 +16,13 @@ export default function NavbarRoutes () {
{ isTeacherPage || isPlayerPage ? ( - ) :( - From 0037f75ca731385db648f7a5110d8721aeb797b7 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 01:54:22 +0600 Subject: [PATCH 038/706] teach mode && customize --- .../(dashboard)/(routes)/teacher/courses/page.tsx | 11 +++++++++++ src/app/layout.tsx | 2 +- src/components/NavbarRoutes.tsx | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/page.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/page.tsx new file mode 100644 index 0000000..602fd68 --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/page.tsx @@ -0,0 +1,11 @@ +'use client' +export default function CoursesPage () { + return ( +
+ CoursesPage + +
+ ); +}; + + diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e09daa9..e37a583 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -24,7 +24,7 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - + { isTeacherPage || isPlayerPage ? ( + + + ) :( + + + CoursesPage
diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx index a878e20..7287c69 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx @@ -39,8 +39,8 @@ const teacherRoutes = [ }, { icon: BarChart, - label: 'Analitycs', - href: '/teacher/analitycs', + label: 'Analytics', + href: '/teacher/analytics', }, ]; From f1559f25dbcbe71dc1a3e984fc2d1c0d3927632e Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 03:32:14 +0600 Subject: [PATCH 045/706] now i am really tired, let s build develop tomorrow --- package-lock.json | 112 +++++++++++++++++- package.json | 4 +- .../(routes)/teacher/create/page.tsx | 18 +++ 3 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx diff --git a/package-lock.json b/package-lock.json index bae2f01..8c58dce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-visually-hidden": "^1.1.1", + "axios": "^1.7.9", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.474.0", @@ -19,7 +20,8 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "tailwind-merge": "^3.0.1", - "tailwindcss-animate": "^1.0.7" + "tailwindcss-animate": "^1.0.7", + "zod": "^3.24.1" }, "devDependencies": { "@types/node": "^20", @@ -1221,6 +1223,23 @@ "node": ">=10" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1406,6 +1425,18 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -1463,6 +1494,15 @@ "devOptional": true, "license": "MIT" }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -1571,6 +1611,26 @@ "node": ">=8" } }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreground-child": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", @@ -1587,6 +1647,20 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -1857,6 +1931,27 @@ "node": ">=8.6" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -2245,6 +2340,12 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "license": "MIT" }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3059,6 +3160,15 @@ "engines": { "node": ">= 14" } + }, + "node_modules/zod": { + "version": "3.24.1", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", + "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/package.json b/package.json index 4e7a665..59c7740 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-visually-hidden": "^1.1.1", + "axios": "^1.7.9", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.474.0", @@ -20,7 +21,8 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "tailwind-merge": "^3.0.1", - "tailwindcss-animate": "^1.0.7" + "tailwindcss-animate": "^1.0.7", + "zod": "^3.24.1" }, "devDependencies": { "@types/node": "^20", diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx new file mode 100644 index 0000000..dfaa9d9 --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -0,0 +1,18 @@ +'use client' +// const formSchema = z.object({ +// title: z.string().min(1){ +// message: "title is requires" +// } +// }) +export default function CreatePage() { + // const form = useForm + + return ( +
+ CreatePage + +
+ ); +}; + + From 98da6409aa960421cb7d8f2d160406b6f92dda1c Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 12:25:59 +0600 Subject: [PATCH 046/706] zodadded --- .../(routes)/teacher/create/page.tsx | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index dfaa9d9..b5654f7 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -1,11 +1,21 @@ 'use client' -// const formSchema = z.object({ -// title: z.string().min(1){ -// message: "title is requires" -// } -// }) + const formSchema = z.object({ +title: z.string().min(1){ + message: "title is requires" + } + }) export default function CreatePage() { - // const form = useForm + const form = useForm>({ + resolver: zodResolver(formSchema), + defaultValues: { + title: "" + } + }) + + const {} = form.formState; + const + + return (
From 6d2927cbb1317137f46761ccce828234ccd87517 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 12:29:52 +0600 Subject: [PATCH 047/706] customize reacthookform-zod --- package-lock.json | 17 +++++++++++++++++ package.json | 1 + .../(routes)/teacher/create/page.tsx | 10 ++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c58dce..1f2fc84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "next": "15.1.6", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-hook-form": "^7.54.2", "tailwind-merge": "^3.0.1", "tailwindcss-animate": "^1.0.7", "zod": "^3.24.1" @@ -2387,6 +2388,22 @@ "react": "^19.0.0" } }, + "node_modules/react-hook-form": { + "version": "7.54.2", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.54.2.tgz", + "integrity": "sha512-eHpAUgUjWbZocoQYUHposymRb4ZP6d0uwUnooL2uOybA9/3tPUvoAKqEWK1WaSiTxxOfTpffNZP7QwlnM3/gEg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-hook-form" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18 || ^19" + } + }, "node_modules/react-remove-scroll": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", diff --git a/package.json b/package.json index 59c7740..bb592ef 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "next": "15.1.6", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-hook-form": "^7.54.2", "tailwind-merge": "^3.0.1", "tailwindcss-animate": "^1.0.7", "zod": "^3.24.1" diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index b5654f7..af395fd 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -1,5 +1,8 @@ 'use client' - const formSchema = z.object({ + import {z} from "zod"; +import {useForm} from "react-hook-form"; +import {zodResolver} from "@hookform/resolver/zod" +const formSchema = z.object({ title: z.string().min(1){ message: "title is requires" } @@ -13,7 +16,10 @@ export default function CreatePage() { }) const {} = form.formState; - const + const onSubmit =(values:z.infer) => { + console.log(values) + + } From 9bdca4db8fa5c1e4730e23cec040714b7f4edb71 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 12:36:31 +0600 Subject: [PATCH 048/706] develop zod/hook-form --- package-lock.json | 10 ++++ package.json | 1 + .../(routes)/teacher/create/page.tsx | 55 +++++++++++-------- 3 files changed, 42 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f2fc84..0d3a862 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "dependencies": { "@clerk/nextjs": "^6.11.0", + "@hookform/resolvers": "^3.10.0", "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-visually-hidden": "^1.1.1", @@ -178,6 +179,15 @@ "tslib": "^2.4.0" } }, + "node_modules/@hookform/resolvers": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.10.0.tgz", + "integrity": "sha512-79Dv+3mDF7i+2ajj7SkypSKHhl1cbln1OGavqrsF7p6mbUv11xpqpacPsGDCTRvCSjEEIez2ef1NveSVL3b0Ag==", + "license": "MIT", + "peerDependencies": { + "react-hook-form": "^7.0.0" + } + }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.33.5", "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", diff --git a/package.json b/package.json index bb592ef..baa0d39 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "@clerk/nextjs": "^6.11.0", + "@hookform/resolvers": "^3.10.0", "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-visually-hidden": "^1.1.1", diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index af395fd..63fb71e 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -1,34 +1,41 @@ -'use client' - import {z} from "zod"; -import {useForm} from "react-hook-form"; -import {zodResolver} from "@hookform/resolver/zod" +'use client'; + +import { z } from 'zod'; +import { useForm } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; + + const formSchema = z.object({ -title: z.string().min(1){ - message: "title is requires" - } - }) -export default function CreatePage() { + title: z.string().min(1, { message: 'Title is required' }) +}); + +export default function CreatePage() { const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { - title: "" + title: '' } - }) - - const {} = form.formState; - const onSubmit =(values:z.infer) => { - console.log(values) - - } + }); + const { errors } = form.formState; + const onSubmit = (values: z.infer) => { + console.log(values); + }; return ( -
- CreatePage - -
- ); -}; - +
+

Create Page

+
+ + {errors.title &&

{errors.title.message}

} + +
+
+ ); +} From 19808ab8ffa9ac4f3cdc453cacb1654c11d3b202 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 12:41:04 +0600 Subject: [PATCH 049/706] form check --- .../(dashboard)/(routes)/teacher/create/page.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 63fb71e..2321f8b 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -24,8 +24,15 @@ export default function CreatePage() { }; return ( -
-

Create Page

+
+
+ + + +

Create Page

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias amet atque dignissimos est itaque neque, odit quis tempore ullam voluptate!

+
+
Date: Wed, 5 Feb 2025 12:49:28 +0600 Subject: [PATCH 050/706] style for dashboard admin panel tech mode --- .../(routes)/teacher/create/page.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 2321f8b..66f178d 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -1,7 +1,7 @@ 'use client'; import { z } from 'zod'; -import { useForm } from 'react-hook-form'; +import {Form, useForm} from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; @@ -33,7 +33,19 @@ export default function CreatePage() {

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias amet atque dignissimos est itaque neque, odit quis tempore ullam voluptate!

- + + + ( + + + + Course title + + + + + )}> + {errors.title.message}

} - +
); } From 1b748586506f2af17ed1515d682533b066d453e1 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 12:53:17 +0600 Subject: [PATCH 051/706] develpo --- .../(dashboard)/(routes)/teacher/create/page.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 66f178d..368201b 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -38,7 +38,15 @@ export default function CreatePage() { ( + + + disabled={isSubmitting} placeholder='e.g Advanced web development' + {...field} + /> + + + Course title @@ -46,14 +54,6 @@ export default function CreatePage() { )}> - - {errors.title &&

{errors.title.message}

} - -
); From fcffd18e9af4b99427ed8f45b310c991e74618c0 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 12:57:24 +0600 Subject: [PATCH 052/706] to main develop --- .../(routes)/teacher/create/page.tsx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 368201b..ed72503 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -3,6 +3,8 @@ import { z } from 'zod'; import {Form, useForm} from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import Link from "next/link"; +import {Button} from "@/components/ui/button"; const formSchema = z.object({ @@ -45,14 +47,31 @@ export default function CreatePage() { /> + + What will you tech this course ? + + + Course title + )}> +
+ + + + + + - )}> +
+
From 2653c6a7f84c32a0c771d488683aa59a40a533b9 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 13:03:40 +0600 Subject: [PATCH 053/706] form check#-2 --- .../(routes)/teacher/create/page.tsx | 131 +++++++++--------- src/components/ui/input.tsx | 22 +++ 2 files changed, 84 insertions(+), 69 deletions(-) create mode 100644 src/components/ui/input.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index ed72503..49ff31e 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -1,79 +1,72 @@ 'use client'; import { z } from 'zod'; -import {Form, useForm} from 'react-hook-form'; +import { useForm, Controller } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; -import Link from "next/link"; -import {Button} from "@/components/ui/button"; - +import Link from 'next/link'; +import { Button } from '@/components/ui/button'; +import {Input} from "@/components/ui/input"; const formSchema = z.object({ - title: z.string().min(1, { message: 'Title is required' }) + title: z.string().min(1, { message: 'Title is required' }) }); export default function CreatePage() { - const form = useForm>({ - resolver: zodResolver(formSchema), - defaultValues: { - title: '' - } - }); - - const { errors } = form.formState; - - const onSubmit = (values: z.infer) => { - console.log(values); - }; - - return ( -
-
- - - -

Create Page

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias amet atque dignissimos est itaque neque, odit quis tempore ullam voluptate!

-
- -
-
- ( - - - - - disabled={isSubmitting} placeholder='e.g Advanced web development' - {...field} - /> - - - - What will you tech this course ? - - - - - - Course title - - - - )}> -
- - - - - - - -
-
- - -
- ); + const { + control, + handleSubmit, + formState: { errors, isValid, isSubmitting } + } = useForm>({ + resolver: zodResolver(formSchema), + defaultValues: { + title: '' + }, + mode: 'onChange' + }); + + const onSubmit = (values: z.infer) => { + console.log(values); + }; + + return ( +
+
+

Create Page

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias amet atque dignissimos est itaque neque, odit quis tempore ullam voluptate! +

+
+ +
+ ( +
+ + + {errors.title &&

{errors.title.message}

} +

What will you teach in this course?

+
+ )} + /> + +
+ + + + +
+ +
+ ); } diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx new file mode 100644 index 0000000..68551b9 --- /dev/null +++ b/src/components/ui/input.tsx @@ -0,0 +1,22 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +const Input = React.forwardRef>( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = "Input" + +export { Input } From c1e01a5a1e749ff9641876d384dc6fbc986e9196 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 13:17:53 +0600 Subject: [PATCH 054/706] fixing a little bug --- package-lock.json | 24 +++ package.json | 1 + .../(routes)/teacher/create/page.tsx | 128 +++++++------ src/components/ui/form.tsx | 178 ++++++++++++++++++ src/components/ui/label.tsx | 26 +++ 5 files changed, 296 insertions(+), 61 deletions(-) create mode 100644 src/components/ui/form.tsx create mode 100644 src/components/ui/label.tsx diff --git a/package-lock.json b/package-lock.json index 0d3a862..643a4f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@clerk/nextjs": "^6.11.0", "@hookform/resolvers": "^3.10.0", "@radix-ui/react-dialog": "^1.1.5", + "@radix-ui/react-label": "^2.1.1", "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-visually-hidden": "^1.1.1", "axios": "^1.7.9", @@ -950,6 +951,29 @@ } } }, + "node_modules/@radix-ui/react-label": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.1.tgz", + "integrity": "sha512-UUw5E4e/2+4kFMH7+YxORXGWggtY6sM8WIwh5RZchhLuUg2H1hc98Py+pr8HMz6rdaYrK2t296ZEjYLOCO5uUw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-portal": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.3.tgz", diff --git a/package.json b/package.json index baa0d39..c4138a3 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@clerk/nextjs": "^6.11.0", "@hookform/resolvers": "^3.10.0", "@radix-ui/react-dialog": "^1.1.5", + "@radix-ui/react-label": "^2.1.1", "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-visually-hidden": "^1.1.1", "axios": "^1.7.9", diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 49ff31e..f1c555f 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -1,72 +1,78 @@ 'use client'; import { z } from 'zod'; -import { useForm, Controller } from 'react-hook-form'; +import {Form, useForm} from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; -import Link from 'next/link'; -import { Button } from '@/components/ui/button'; +import Link from "next/link"; +import {Button} from "@/components/ui/button"; +import {FormControl, FormDescription, FormField, FormItem, FormLabel} from "@/components/ui/form"; import {Input} from "@/components/ui/input"; + const formSchema = z.object({ - title: z.string().min(1, { message: 'Title is required' }) + title: z.string().min(1, { message: 'Title is required' }) }); export default function CreatePage() { - const { - control, - handleSubmit, - formState: { errors, isValid, isSubmitting } - } = useForm>({ - resolver: zodResolver(formSchema), - defaultValues: { - title: '' - }, - mode: 'onChange' - }); - - const onSubmit = (values: z.infer) => { - console.log(values); - }; - - return ( -
-
-

Create Page

-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias amet atque dignissimos est itaque neque, odit quis tempore ullam voluptate! -

-
- -
- ( -
- - - {errors.title &&

{errors.title.message}

} -

What will you teach in this course?

-
- )} - /> - -
- - - - -
- -
- ); + const form = useForm>({ + resolver: zodResolver(formSchema), + defaultValues: { + title: '' + } + }); + + const { errors } = form.formState; + + const onSubmit = (values: z.infer) => { + console.log(values); + }; + + return ( +
+
+ + + +

Create Page

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias amet atque dignissimos est itaque neque, odit quis tempore ullam voluptate!

+
+ +
+
+ ( + + + + + disabled={isSubmitting} placeholder='e.g Advanced web development' + {...field} + /> + + + + What will you tech this course ? + + + + + + Course title + + + )}> +
+ + + + +
+
+ +
+ ); } diff --git a/src/components/ui/form.tsx b/src/components/ui/form.tsx new file mode 100644 index 0000000..ce264ae --- /dev/null +++ b/src/components/ui/form.tsx @@ -0,0 +1,178 @@ +"use client" + +import * as React from "react" +import * as LabelPrimitive from "@radix-ui/react-label" +import { Slot } from "@radix-ui/react-slot" +import { + Controller, + ControllerProps, + FieldPath, + FieldValues, + FormProvider, + useFormContext, +} from "react-hook-form" + +import { cn } from "@/lib/utils" +import { Label } from "@/components/ui/label" + +const Form = FormProvider + +type FormFieldContextValue< + TFieldValues extends FieldValues = FieldValues, + TName extends FieldPath = FieldPath +> = { + name: TName +} + +const FormFieldContext = React.createContext( + {} as FormFieldContextValue +) + +const FormField = < + TFieldValues extends FieldValues = FieldValues, + TName extends FieldPath = FieldPath +>({ + ...props +}: ControllerProps) => { + return ( + + + + ) +} + +const useFormField = () => { + const fieldContext = React.useContext(FormFieldContext) + const itemContext = React.useContext(FormItemContext) + const { getFieldState, formState } = useFormContext() + + const fieldState = getFieldState(fieldContext.name, formState) + + if (!fieldContext) { + throw new Error("useFormField should be used within ") + } + + const { id } = itemContext + + return { + id, + name: fieldContext.name, + formItemId: `${id}-form-item`, + formDescriptionId: `${id}-form-item-description`, + formMessageId: `${id}-form-item-message`, + ...fieldState, + } +} + +type FormItemContextValue = { + id: string +} + +const FormItemContext = React.createContext( + {} as FormItemContextValue +) + +const FormItem = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => { + const id = React.useId() + + return ( + +
+ + ) +}) +FormItem.displayName = "FormItem" + +const FormLabel = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => { + const { error, formItemId } = useFormField() + + return ( +
+
From 8d9cf4251bb88ab8eaa38b999fe16d226f7f1863 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 13:27:58 +0600 Subject: [PATCH 057/706] still changed some errors --- .../(dashboard)/(routes)/teacher/create/page.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 7fdd15c..384f926 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -5,7 +5,7 @@ import { useForm, FormProvider } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; import Link from 'next/link'; import { Button } from '@/components/ui/button'; -import { FormControl, FormDescription, FormField, FormItem, FormLabel,FormMessage } from '@/components/ui/form'; +import {Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage} from '@/components/ui/form'; import { Input } from '@/components/ui/input'; const formSchema = z.object({ @@ -33,9 +33,7 @@ export default function CreatePage() {

What would you like to name yout course?Dont worry you can change later

-
-
- +
What will you teach in this course? + )} /> @@ -67,7 +66,9 @@ export default function CreatePage() { -
+
+ + ); } From 81db5f015ad201283d3a16a392ea32d89c75d537 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 13:31:31 +0600 Subject: [PATCH 058/706] now fixing --- .../(dashboard)/(routes)/teacher/create/page.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 384f926..72abe32 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -49,9 +49,8 @@ export default function CreatePage() { /> What will you teach in this course? - + - )} /> @@ -64,11 +63,9 @@ export default function CreatePage() { - - - - + + ); -} +}; From 5fa653c8e08d19b838c8c1bf7987f9392313c12e Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 13:36:00 +0600 Subject: [PATCH 059/706] now finished form --- .../(routes)/teacher/create/page.tsx | 74 ++++++++++--------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 72abe32..f69e8b3 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -5,7 +5,7 @@ import { useForm, FormProvider } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; import Link from 'next/link'; import { Button } from '@/components/ui/button'; -import {Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage} from '@/components/ui/form'; +import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; const formSchema = z.object({ @@ -20,7 +20,7 @@ export default function CreatePage() { } }); - const {isValid, isSubmitting } = form.formState; + const { isValid, isSubmitting, errors } = form.formState; const onSubmit = (values: z.infer) => { console.log(values); @@ -29,43 +29,45 @@ export default function CreatePage() { return (
-

Name your course

+

Name your course

- What would you like to name yout course?Dont worry you can change later + What would you like to name your course? Don't worry, you can change it later.

-
- - ( - - Course title - - - - What will you teach in this course? - - - )} - /> -
- - + + - - +
+ + +
- - - ); -}; +} From 9f9191ee2f710050aa8939c6c38c10cf7d535f8f Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 14:07:45 +0600 Subject: [PATCH 060/706] react-hot-toas element --- package-lock.json | 28 ++++++++++++++++++- package.json | 1 + .../(routes)/teacher/create/page.tsx | 10 +++++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 643a4f6..492af61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "react-hook-form": "^7.54.2", + "react-hot-toast": "^2.5.1", "tailwind-merge": "^3.0.1", "tailwindcss-animate": "^1.0.7", "zod": "^3.24.1" @@ -1526,7 +1527,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "devOptional": true, "license": "MIT" }, "node_modules/delayed-stream": { @@ -1766,6 +1766,15 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "license": "BSD-2-Clause" }, + "node_modules/goober": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.16.tgz", + "integrity": "sha512-erjk19y1U33+XAMe1VTvIONHYoSqE4iS7BYUZfHaqeohLmnC0FdxEh7rQU+6MZ4OajItzjZFSRtVANrQwNq6/g==", + "license": "MIT", + "peerDependencies": { + "csstype": "^3.0.10" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -2438,6 +2447,23 @@ "react": "^16.8.0 || ^17 || ^18 || ^19" } }, + "node_modules/react-hot-toast": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.5.1.tgz", + "integrity": "sha512-54Gq1ZD1JbmAb4psp9bvFHjS7lje+8ubboUmvKZkCsQBLH6AOpZ9JemfRvIdHcfb9AZXRaFLrb3qUobGYDJhFQ==", + "license": "MIT", + "dependencies": { + "csstype": "^3.1.3", + "goober": "^2.1.16" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, "node_modules/react-remove-scroll": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", diff --git a/package.json b/package.json index c4138a3..30ba436 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "react-hook-form": "^7.54.2", + "react-hot-toast": "^2.5.1", "tailwind-merge": "^3.0.1", "tailwindcss-animate": "^1.0.7", "zod": "^3.24.1" diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index f69e8b3..424b86d 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -22,8 +22,14 @@ export default function CreatePage() { const { isValid, isSubmitting, errors } = form.formState; - const onSubmit = (values: z.infer) => { - console.log(values); + const onSubmit = async (values: z.infer) => { +try { + const response = await axios.post('/api/courses,values'); + router.push(`/teacher/courses/${response.data.id}`); +}catch(error) { + console.log('Something went wrong'); + +} }; return ( From 863e152f954f789ca4a58c702dd0024bde14c267 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 14:12:51 +0600 Subject: [PATCH 061/706] develop --- src/app/layout.tsx | 2 ++ src/components/provider/toaster-provider.tsx | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/components/provider/toaster-provider.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e37a583..3d9b760 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; import {ClerkProvider} from "@clerk/nextjs"; +import ToasterProvider from "@/components/provider/toaster-provider"; const geistSans = Geist({ variable: "--font-geist-sans", @@ -29,6 +30,7 @@ export default function RootLayout({ + {children} diff --git a/src/components/provider/toaster-provider.tsx b/src/components/provider/toaster-provider.tsx new file mode 100644 index 0000000..bc72a8e --- /dev/null +++ b/src/components/provider/toaster-provider.tsx @@ -0,0 +1,8 @@ +'use client' +import {Toaster} from "react-hot-toast"; + +export default function ToasterProvider () { + return +}; + + From a9ffe9ad46191e84434e789cb7e46b6653e23399 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 14:15:05 +0600 Subject: [PATCH 062/706] added toaster for submit form on sidebar tech mode --- .../(platform)/(dashboard)/(routes)/teacher/create/page.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 424b86d..0120369 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -7,6 +7,8 @@ import Link from 'next/link'; import { Button } from '@/components/ui/button'; import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; +import {router} from "next/client"; +import toast from "react-hot-toast"; const formSchema = z.object({ title: z.string().min(1, { message: 'Title is required' }) @@ -27,8 +29,7 @@ try { const response = await axios.post('/api/courses,values'); router.push(`/teacher/courses/${response.data.id}`); }catch(error) { - console.log('Something went wrong'); - + toast.error('something went wrong'); } }; From e7496dd6e1327c8a0ef933856b15064c862877e2 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 14:17:12 +0600 Subject: [PATCH 063/706] added prisma --- bun.lock | 553 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 + 2 files changed, 555 insertions(+) create mode 100644 bun.lock diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..995c6ca --- /dev/null +++ b/bun.lock @@ -0,0 +1,553 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "it-course", + "dependencies": { + "@clerk/nextjs": "^6.11.0", + "@hookform/resolvers": "^3.10.0", + "@radix-ui/react-dialog": "^1.1.5", + "@radix-ui/react-label": "^2.1.1", + "@radix-ui/react-slot": "^1.1.1", + "@radix-ui/react-visually-hidden": "^1.1.1", + "axios": "^1.7.9", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "init": "^0.1.2", + "lucide-react": "^0.474.0", + "next": "15.1.6", + "prisma": "^6.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-hook-form": "^7.54.2", + "react-hot-toast": "^2.5.1", + "tailwind-merge": "^3.0.1", + "tailwindcss-animate": "^1.0.7", + "zod": "^3.24.1", + }, + "devDependencies": { + "@types/node": "^20", + "@types/react": "^19", + "@types/react-dom": "^19", + "postcss": "^8", + "tailwindcss": "^3.4.1", + "typescript": "^5", + }, + }, + }, + "packages": { + "@alloc/quick-lru": ["@alloc/quick-lru@5.2.0", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="], + + "@clerk/backend": ["@clerk/backend@1.23.11", "", { "dependencies": { "@clerk/shared": "^2.20.18", "@clerk/types": "^4.45.0", "cookie": "1.0.2", "snakecase-keys": "8.0.1", "tslib": "2.4.1" } }, "sha512-N5CYCnVbSVXUkQg9oAAAf9r/kfPmBGxMqjzslDC9Tl3rkXFTkWjkBNnToB6We2ySdrmqiQGR/+/c4mS9XRbaOQ=="], + + "@clerk/clerk-react": ["@clerk/clerk-react@5.22.10", "", { "dependencies": { "@clerk/shared": "^2.20.18", "@clerk/types": "^4.45.0", "tslib": "2.4.1" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0 || ^19.0.0-0", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0" } }, "sha512-3tTUt+3w5E+4ePl+6q6ugNTgjyjQw000nouXRngCEorDC2545Lc2HTZ37n1W8WuTx2BN32Rerjf2UJDmpRqrYg=="], + + "@clerk/nextjs": ["@clerk/nextjs@6.11.0", "", { "dependencies": { "@clerk/backend": "^1.23.11", "@clerk/clerk-react": "^5.22.10", "@clerk/shared": "^2.20.18", "@clerk/types": "^4.45.0", "crypto-js": "4.2.0", "server-only": "0.0.1", "tslib": "2.4.1" }, "peerDependencies": { "next": "^13.5.4 || ^14.0.3 || ^15.0.0", "react": "^18.0.0 || ^19.0.0 || ^19.0.0-0", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0" } }, "sha512-5ssp5OmGO3kH0PvfNhEoQFdrMnn80AdCI+h0LSQUGkQuGAFyRXidwne6Lu3W8S5ATqiZLPS8A8RMhuP75D+5uQ=="], + + "@clerk/shared": ["@clerk/shared@2.20.18", "", { "dependencies": { "@clerk/types": "^4.45.0", "dequal": "2.0.3", "glob-to-regexp": "0.4.1", "js-cookie": "3.0.5", "std-env": "^3.7.0", "swr": "^2.2.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0 || ^19.0.0-0", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0" } }, "sha512-vSQLZSRFr62+YeE1KE/Xu/eWCrwYJRNA2KRyQYmb2VPleFNmOjtTNlO4xkMZ0eN6BLKxrBo9b0NVwu3L28FhKg=="], + + "@clerk/types": ["@clerk/types@4.45.0", "", { "dependencies": { "csstype": "3.1.1" } }, "sha512-DSXPWq1xD01tzyHv7CugX2T/XfVUZX2xxQ92cs+JPTrGoqIYm+yjRWqOz1CVJ/76TbYMOrB0efCGOxEcNV/PQw=="], + + "@emnapi/runtime": ["@emnapi/runtime@1.3.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw=="], + + "@hookform/resolvers": ["@hookform/resolvers@3.10.0", "", { "peerDependencies": { "react-hook-form": "^7.0.0" } }, "sha512-79Dv+3mDF7i+2ajj7SkypSKHhl1cbln1OGavqrsF7p6mbUv11xpqpacPsGDCTRvCSjEEIez2ef1NveSVL3b0Ag=="], + + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.0.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ=="], + + "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.0.4" }, "os": "darwin", "cpu": "x64" }, "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q=="], + + "@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.0.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg=="], + + "@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.0.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ=="], + + "@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.0.5", "", { "os": "linux", "cpu": "arm" }, "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g=="], + + "@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.0.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA=="], + + "@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.0.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA=="], + + "@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.0.4", "", { "os": "linux", "cpu": "x64" }, "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw=="], + + "@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.0.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA=="], + + "@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.0.4", "", { "os": "linux", "cpu": "x64" }, "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw=="], + + "@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.0.5" }, "os": "linux", "cpu": "arm" }, "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ=="], + + "@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA=="], + + "@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.0.4" }, "os": "linux", "cpu": "s390x" }, "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q=="], + + "@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.0.4" }, "os": "linux", "cpu": "x64" }, "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA=="], + + "@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g=="], + + "@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.0.4" }, "os": "linux", "cpu": "x64" }, "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw=="], + + "@img/sharp-wasm32": ["@img/sharp-wasm32@0.33.5", "", { "dependencies": { "@emnapi/runtime": "^1.2.0" }, "cpu": "none" }, "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg=="], + + "@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.33.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ=="], + + "@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.33.5", "", { "os": "win32", "cpu": "x64" }, "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg=="], + + "@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="], + + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], + + "@next/env": ["@next/env@15.1.6", "", {}, "sha512-d9AFQVPEYNr+aqokIiPLNK/MTyt3DWa/dpKveiAaVccUadFbhFEvY6FXYX2LJO2Hv7PHnLBu2oWwB4uBuHjr/w=="], + + "@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.1.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-u7lg4Mpl9qWpKgy6NzEkz/w0/keEHtOybmIl0ykgItBxEM5mYotS5PmqTpo+Rhg8FiOiWgwr8USxmKQkqLBCrw=="], + + "@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.1.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-x1jGpbHbZoZ69nRuogGL2MYPLqohlhnT9OCU6E6QFewwup+z+M6r8oU47BTeJcWsF2sdBahp5cKiAcDbwwK/lg=="], + + "@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.1.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-jar9sFw0XewXsBzPf9runGzoivajeWJUc/JkfbLTC4it9EhU8v7tCRLH7l5Y1ReTMN6zKJO0kKAGqDk8YSO2bg=="], + + "@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.1.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-+n3u//bfsrIaZch4cgOJ3tXCTbSxz0s6brJtU3SzLOvkJlPQMJ+eHVRi6qM2kKKKLuMY+tcau8XD9CJ1OjeSQQ=="], + + "@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.1.6", "", { "os": "linux", "cpu": "x64" }, "sha512-SpuDEXixM3PycniL4iVCLyUyvcl6Lt0mtv3am08sucskpG0tYkW1KlRhTgj4LI5ehyxriVVcfdoxuuP8csi3kQ=="], + + "@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.1.6", "", { "os": "linux", "cpu": "x64" }, "sha512-L4druWmdFSZIIRhF+G60API5sFB7suTbDRhYWSjiw0RbE+15igQvE2g2+S973pMGvwN3guw7cJUjA/TmbPWTHQ=="], + + "@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.1.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-s8w6EeqNmi6gdvM19tqKKWbCyOBvXFbndkGHl+c9YrzsLARRdCHsD9S1fMj8gsXm9v8vhC8s3N8rjuC/XrtkEg=="], + + "@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.1.6", "", { "os": "win32", "cpu": "x64" }, "sha512-6xomMuu54FAFxttYr5PJbEfu96godcxBTRk1OhAvJq0/EnmFU/Ybiax30Snis4vdWZ9LGpf7Roy5fSs7v/5ROQ=="], + + "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="], + + "@nodelib/fs.stat": ["@nodelib/fs.stat@2.0.5", "", {}, "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="], + + "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="], + + "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], + + "@prisma/debug": ["@prisma/debug@6.3.1", "", {}, "sha512-RrEBkd+HLZx+ydfmYT0jUj7wjLiS95wfTOSQ+8FQbvb6vHh5AeKfEPt/XUQ5+Buljj8hltEfOslEW57/wQIVeA=="], + + "@prisma/engines": ["@prisma/engines@6.3.1", "", { "dependencies": { "@prisma/debug": "6.3.1", "@prisma/engines-version": "6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0", "@prisma/fetch-engine": "6.3.1", "@prisma/get-platform": "6.3.1" } }, "sha512-sXdqEVLyGAJ5/iUoG/Ea5AdHMN71m6PzMBWRQnLmhhOejzqAaEr8rUd623ql6OJpED4s/U4vIn4dg1qkF7vGag=="], + + "@prisma/engines-version": ["@prisma/engines-version@6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0", "", {}, "sha512-R/ZcMuaWZT2UBmgX3Ko6PAV3f8//ZzsjRIG1eKqp3f2rqEqVtCv+mtzuH2rBPUC9ujJ5kCb9wwpxeyCkLcHVyA=="], + + "@prisma/fetch-engine": ["@prisma/fetch-engine@6.3.1", "", { "dependencies": { "@prisma/debug": "6.3.1", "@prisma/engines-version": "6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0", "@prisma/get-platform": "6.3.1" } }, "sha512-HOf/0umOgt+/S2xtZze+FHKoxpVg4YpVxROr6g2YG09VsI3Ipyb+rGvD6QGbCqkq5NTWAAZoOGNL+oy7t+IhaQ=="], + + "@prisma/get-platform": ["@prisma/get-platform@6.3.1", "", { "dependencies": { "@prisma/debug": "6.3.1" } }, "sha512-AYLq6Hk9xG73JdLWJ3Ip9Wg/vlP7xPvftGBalsPzKDOHr/ImhwJ09eS8xC2vNT12DlzGxhfk8BkL0ve2OriNhQ=="], + + "@radix-ui/primitive": ["@radix-ui/primitive@1.1.1", "", {}, "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA=="], + + "@radix-ui/react-compose-refs": ["@radix-ui/react-compose-refs@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw=="], + + "@radix-ui/react-context": ["@radix-ui/react-context@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q=="], + + "@radix-ui/react-dialog": ["@radix-ui/react-dialog@1.1.5", "", { "dependencies": { "@radix-ui/primitive": "1.1.1", "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.4", "@radix-ui/react-focus-guards": "1.1.1", "@radix-ui/react-focus-scope": "1.1.1", "@radix-ui/react-id": "1.1.0", "@radix-ui/react-portal": "1.1.3", "@radix-ui/react-presence": "1.1.2", "@radix-ui/react-primitive": "2.0.1", "@radix-ui/react-slot": "1.1.1", "@radix-ui/react-use-controllable-state": "1.1.0", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.6.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-LaO3e5h/NOEL4OfXjxD43k9Dx+vn+8n+PCFt6uhX/BADFflllyv3WJG6rgvvSVBxpTch938Qq/LGc2MMxipXPw=="], + + "@radix-ui/react-dismissable-layer": ["@radix-ui/react-dismissable-layer@1.1.4", "", { "dependencies": { "@radix-ui/primitive": "1.1.1", "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-primitive": "2.0.1", "@radix-ui/react-use-callback-ref": "1.1.0", "@radix-ui/react-use-escape-keydown": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-XDUI0IVYVSwjMXxM6P4Dfti7AH+Y4oS/TB+sglZ/EXc7cqLwGAmp1NlMrcUjj7ks6R5WTZuWKv44FBbLpwU3sA=="], + + "@radix-ui/react-focus-guards": ["@radix-ui/react-focus-guards@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg=="], + + "@radix-ui/react-focus-scope": ["@radix-ui/react-focus-scope@1.1.1", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-primitive": "2.0.1", "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-01omzJAYRxXdG2/he/+xy+c8a8gCydoQ1yOxnWNcRhrrBW5W+RQJ22EK1SaO8tb3WoUsuEw7mJjBozPzihDFjA=="], + + "@radix-ui/react-id": ["@radix-ui/react-id@1.1.0", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA=="], + + "@radix-ui/react-label": ["@radix-ui/react-label@2.1.1", "", { "dependencies": { "@radix-ui/react-primitive": "2.0.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-UUw5E4e/2+4kFMH7+YxORXGWggtY6sM8WIwh5RZchhLuUg2H1hc98Py+pr8HMz6rdaYrK2t296ZEjYLOCO5uUw=="], + + "@radix-ui/react-portal": ["@radix-ui/react-portal@1.1.3", "", { "dependencies": { "@radix-ui/react-primitive": "2.0.1", "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-NciRqhXnGojhT93RPyDaMPfLH3ZSl4jjIFbZQ1b/vxvZEdHsBZ49wP9w8L3HzUQwep01LcWtkUvm0OVB5JAHTw=="], + + "@radix-ui/react-presence": ["@radix-ui/react-presence@1.1.2", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg=="], + + "@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.0.1", "", { "dependencies": { "@radix-ui/react-slot": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-sHCWTtxwNn3L3fH8qAfnF3WbUZycW93SM1j3NFDzXBiz8D6F5UTTy8G1+WFEaiCdvCVRJWj6N2R4Xq6HdiHmDg=="], + + "@radix-ui/react-slot": ["@radix-ui/react-slot@1.1.1", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g=="], + + "@radix-ui/react-use-callback-ref": ["@radix-ui/react-use-callback-ref@1.1.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw=="], + + "@radix-ui/react-use-controllable-state": ["@radix-ui/react-use-controllable-state@1.1.0", "", { "dependencies": { "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw=="], + + "@radix-ui/react-use-escape-keydown": ["@radix-ui/react-use-escape-keydown@1.1.0", "", { "dependencies": { "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw=="], + + "@radix-ui/react-use-layout-effect": ["@radix-ui/react-use-layout-effect@1.1.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w=="], + + "@radix-ui/react-visually-hidden": ["@radix-ui/react-visually-hidden@1.1.1", "", { "dependencies": { "@radix-ui/react-primitive": "2.0.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" } }, "sha512-vVfA2IZ9q/J+gEamvj761Oq1FpWgCDaNOOIfbPVp2MVPLEomUr5+Vf7kJGwQ24YxZSlQVar7Bes8kyTo5Dshpg=="], + + "@swc/counter": ["@swc/counter@0.1.3", "", {}, "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ=="], + + "@swc/helpers": ["@swc/helpers@0.5.15", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g=="], + + "@types/node": ["@types/node@20.17.16", "", { "dependencies": { "undici-types": "~6.19.2" } }, "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw=="], + + "@types/react": ["@types/react@19.0.8", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw=="], + + "@types/react-dom": ["@types/react-dom@19.0.3", "", { "peerDependencies": { "@types/react": "^19.0.0" } }, "sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA=="], + + "ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], + + "ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="], + + "any-promise": ["any-promise@1.3.0", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="], + + "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], + + "arg": ["arg@5.0.2", "", {}, "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="], + + "aria-hidden": ["aria-hidden@1.2.4", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A=="], + + "asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="], + + "axios": ["axios@1.7.9", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw=="], + + "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + + "binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="], + + "brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], + + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + + "busboy": ["busboy@1.6.0", "", { "dependencies": { "streamsearch": "^1.1.0" } }, "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA=="], + + "camelcase-css": ["camelcase-css@2.0.1", "", {}, "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA=="], + + "caniuse-lite": ["caniuse-lite@1.0.30001696", "", {}, "sha512-pDCPkvzfa39ehJtJ+OwGT/2yvT2SbjfHhiIW2LWOAcMQ7BzwxT/XuyUp4OTOd0XFWA6BKw0JalnBHgSi5DGJBQ=="], + + "chokidar": ["chokidar@3.6.0", "", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="], + + "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], + + "client-only": ["client-only@0.0.1", "", {}, "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="], + + "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], + + "color": ["color@4.2.3", "", { "dependencies": { "color-convert": "^2.0.1", "color-string": "^1.9.0" } }, "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A=="], + + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + + "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], + + "color-string": ["color-string@1.9.1", "", { "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } }, "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg=="], + + "combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="], + + "commander": ["commander@4.1.1", "", {}, "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="], + + "cookie": ["cookie@1.0.2", "", {}, "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA=="], + + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + + "crypto-js": ["crypto-js@4.2.0", "", {}, "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="], + + "cssesc": ["cssesc@3.0.0", "", { "bin": "bin/cssesc" }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="], + + "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], + + "daemon": ["daemon@1.1.0", "", {}, "sha512-1vX9YVcP21gt12nSD3SQRC/uPU7fyA6M8qyClTBIFuiRWoylFn57PwXhjBAqRl085bZAje7sILhZU48qcS9SWw=="], + + "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="], + + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], + + "detect-libc": ["detect-libc@2.0.3", "", {}, "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw=="], + + "detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="], + + "didyoumean": ["didyoumean@1.2.2", "", {}, "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="], + + "dlv": ["dlv@1.1.3", "", {}, "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="], + + "dot-case": ["dot-case@3.0.4", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w=="], + + "eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="], + + "emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], + + "fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="], + + "fastq": ["fastq@1.19.0", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA=="], + + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], + + "follow-redirects": ["follow-redirects@1.15.9", "", {}, "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ=="], + + "foreground-child": ["foreground-child@3.3.0", "", { "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" } }, "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg=="], + + "form-data": ["form-data@4.0.1", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + + "get-nonce": ["get-nonce@1.0.1", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="], + + "glob": ["glob@10.4.5", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": "dist/esm/bin.mjs" }, "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg=="], + + "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="], + + "glob-to-regexp": ["glob-to-regexp@0.4.1", "", {}, "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="], + + "goober": ["goober@2.1.16", "", { "peerDependencies": { "csstype": "^3.0.10" } }, "sha512-erjk19y1U33+XAMe1VTvIONHYoSqE4iS7BYUZfHaqeohLmnC0FdxEh7rQU+6MZ4OajItzjZFSRtVANrQwNq6/g=="], + + "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + + "init": ["init@0.1.2", "", { "dependencies": { "daemon": ">=0.3.0" } }, "sha512-IvHUjULS2q+BXJdiu4FHkByh3+qSFmkOXQ2ItSfYTtkdUksQc0yNX6f1uDyokzRV71tjpFsFc3ckeYLJXunTGw=="], + + "is-arrayish": ["is-arrayish@0.3.2", "", {}, "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="], + + "is-binary-path": ["is-binary-path@2.1.0", "", { "dependencies": { "binary-extensions": "^2.0.0" } }, "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw=="], + + "is-core-module": ["is-core-module@2.16.1", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w=="], + + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], + + "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], + + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + + "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + + "jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="], + + "jiti": ["jiti@1.21.7", "", { "bin": "bin/jiti.js" }, "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A=="], + + "js-cookie": ["js-cookie@3.0.5", "", {}, "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw=="], + + "lilconfig": ["lilconfig@3.1.3", "", {}, "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw=="], + + "lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="], + + "lower-case": ["lower-case@2.0.2", "", { "dependencies": { "tslib": "^2.0.3" } }, "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg=="], + + "lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], + + "lucide-react": ["lucide-react@0.474.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-CmghgHkh0OJNmxGKWc0qfPJCYHASPMVSyGY8fj3xgk4v84ItqDg64JNKFZn5hC6E0vHi6gxnbCgwhyVB09wQtA=="], + + "map-obj": ["map-obj@4.3.0", "", {}, "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ=="], + + "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], + + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], + + "mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="], + + "mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], + + "minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + + "minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + + "mz": ["mz@2.7.0", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="], + + "nanoid": ["nanoid@3.3.8", "", { "bin": "bin/nanoid.cjs" }, "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w=="], + + "next": ["next@15.1.6", "", { "dependencies": { "@next/env": "15.1.6", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.1.6", "@next/swc-darwin-x64": "15.1.6", "@next/swc-linux-arm64-gnu": "15.1.6", "@next/swc-linux-arm64-musl": "15.1.6", "@next/swc-linux-x64-gnu": "15.1.6", "@next/swc-linux-x64-musl": "15.1.6", "@next/swc-win32-arm64-msvc": "15.1.6", "@next/swc-win32-x64-msvc": "15.1.6", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": "dist/bin/next" }, "sha512-Hch4wzbaX0vKQtalpXvUiw5sYivBy4cm5rzUKrBnUB/y436LGrvOUqYvlSeNVCWFO/770gDlltR9gqZH62ct4Q=="], + + "no-case": ["no-case@3.0.4", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="], + + "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], + + "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], + + "object-hash": ["object-hash@3.0.0", "", {}, "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw=="], + + "package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="], + + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + + "path-parse": ["path-parse@1.0.7", "", {}, "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="], + + "path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + + "pify": ["pify@2.3.0", "", {}, "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog=="], + + "pirates": ["pirates@4.0.6", "", {}, "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg=="], + + "postcss": ["postcss@8.5.1", "", { "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ=="], + + "postcss-import": ["postcss-import@15.1.0", "", { "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", "resolve": "^1.1.7" }, "peerDependencies": { "postcss": "^8.0.0" } }, "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew=="], + + "postcss-js": ["postcss-js@4.0.1", "", { "dependencies": { "camelcase-css": "^2.0.1" }, "peerDependencies": { "postcss": "^8.4.21" } }, "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw=="], + + "postcss-load-config": ["postcss-load-config@4.0.2", "", { "dependencies": { "lilconfig": "^3.0.0", "yaml": "^2.3.4" }, "peerDependencies": { "postcss": ">=8.0.9", "ts-node": ">=9.0.0" }, "optionalPeers": ["ts-node"] }, "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ=="], + + "postcss-nested": ["postcss-nested@6.2.0", "", { "dependencies": { "postcss-selector-parser": "^6.1.1" }, "peerDependencies": { "postcss": "^8.2.14" } }, "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ=="], + + "postcss-selector-parser": ["postcss-selector-parser@6.1.2", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg=="], + + "postcss-value-parser": ["postcss-value-parser@4.2.0", "", {}, "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="], + + "prisma": ["prisma@6.3.1", "", { "dependencies": { "@prisma/engines": "6.3.1" }, "optionalDependencies": { "fsevents": "2.3.3" }, "peerDependencies": { "typescript": ">=5.1.0" }, "optionalPeers": ["typescript"], "bin": { "prisma": "build/index.js" } }, "sha512-JKCZWvBC3enxk51tY4TWzS4b5iRt4sSU1uHn2I183giZTvonXaQonzVtjLzpOHE7qu9MxY510kAtFGJwryKe3Q=="], + + "proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="], + + "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="], + + "react": ["react@19.0.0", "", {}, "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ=="], + + "react-dom": ["react-dom@19.0.0", "", { "dependencies": { "scheduler": "^0.25.0" }, "peerDependencies": { "react": "^19.0.0" } }, "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ=="], + + "react-hook-form": ["react-hook-form@7.54.2", "", { "peerDependencies": { "react": "^16.8.0 || ^17 || ^18 || ^19" } }, "sha512-eHpAUgUjWbZocoQYUHposymRb4ZP6d0uwUnooL2uOybA9/3tPUvoAKqEWK1WaSiTxxOfTpffNZP7QwlnM3/gEg=="], + + "react-hot-toast": ["react-hot-toast@2.5.1", "", { "dependencies": { "csstype": "^3.1.3", "goober": "^2.1.16" }, "peerDependencies": { "react": ">=16", "react-dom": ">=16" } }, "sha512-54Gq1ZD1JbmAb4psp9bvFHjS7lje+8ubboUmvKZkCsQBLH6AOpZ9JemfRvIdHcfb9AZXRaFLrb3qUobGYDJhFQ=="], + + "react-remove-scroll": ["react-remove-scroll@2.6.3", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ=="], + + "react-remove-scroll-bar": ["react-remove-scroll-bar@2.3.8", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="], + + "react-style-singleton": ["react-style-singleton@2.2.3", "", { "dependencies": { "get-nonce": "^1.0.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ=="], + + "read-cache": ["read-cache@1.0.0", "", { "dependencies": { "pify": "^2.3.0" } }, "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA=="], + + "readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], + + "resolve": ["resolve@1.22.10", "", { "dependencies": { "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": "bin/resolve" }, "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w=="], + + "reusify": ["reusify@1.0.4", "", {}, "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw=="], + + "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="], + + "scheduler": ["scheduler@0.25.0", "", {}, "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA=="], + + "semver": ["semver@7.7.0", "", { "bin": "bin/semver.js" }, "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ=="], + + "server-only": ["server-only@0.0.1", "", {}, "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA=="], + + "sharp": ["sharp@0.33.5", "", { "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", "semver": "^7.6.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.33.5", "@img/sharp-darwin-x64": "0.33.5", "@img/sharp-libvips-darwin-arm64": "1.0.4", "@img/sharp-libvips-darwin-x64": "1.0.4", "@img/sharp-libvips-linux-arm": "1.0.5", "@img/sharp-libvips-linux-arm64": "1.0.4", "@img/sharp-libvips-linux-s390x": "1.0.4", "@img/sharp-libvips-linux-x64": "1.0.4", "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", "@img/sharp-libvips-linuxmusl-x64": "1.0.4", "@img/sharp-linux-arm": "0.33.5", "@img/sharp-linux-arm64": "0.33.5", "@img/sharp-linux-s390x": "0.33.5", "@img/sharp-linux-x64": "0.33.5", "@img/sharp-linuxmusl-arm64": "0.33.5", "@img/sharp-linuxmusl-x64": "0.33.5", "@img/sharp-wasm32": "0.33.5", "@img/sharp-win32-ia32": "0.33.5", "@img/sharp-win32-x64": "0.33.5" } }, "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw=="], + + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + + "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], + + "simple-swizzle": ["simple-swizzle@0.2.2", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg=="], + + "snake-case": ["snake-case@3.0.4", "", { "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg=="], + + "snakecase-keys": ["snakecase-keys@8.0.1", "", { "dependencies": { "map-obj": "^4.1.0", "snake-case": "^3.0.4", "type-fest": "^4.15.0" } }, "sha512-Sj51kE1zC7zh6TDlNNz0/Jn1n5HiHdoQErxO8jLtnyrkJW/M5PrI7x05uDgY3BO7OUQYKCvmeMurW6BPUdwEOw=="], + + "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + + "std-env": ["std-env@3.8.0", "", {}, "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w=="], + + "streamsearch": ["streamsearch@1.1.0", "", {}, "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg=="], + + "string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], + + "string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="], + + "strip-ansi-cjs": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "styled-jsx": ["styled-jsx@5.1.6", "", { "dependencies": { "client-only": "0.0.1" }, "peerDependencies": { "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" } }, "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA=="], + + "sucrase": ["sucrase@3.35.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", "glob": "^10.3.10", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", "ts-interface-checker": "^0.1.9" }, "bin": { "sucrase": "bin/sucrase", "sucrase-node": "bin/sucrase-node" } }, "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA=="], + + "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], + + "swr": ["swr@2.3.0", "", { "dependencies": { "dequal": "^2.0.3", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-NyZ76wA4yElZWBHzSgEJc28a0u6QZvhb6w0azeL2k7+Q1gAzVK+IqQYXhVOC/mzi+HZIozrZvBVeSeOZNR2bqA=="], + + "tailwind-merge": ["tailwind-merge@3.0.1", "", {}, "sha512-AvzE8FmSoXC7nC+oU5GlQJbip2UO7tmOhOfQyOmPhrStOGXHU08j8mZEHZ4BmCqY5dWTCo4ClWkNyRNx1wpT0g=="], + + "tailwindcss": ["tailwindcss@3.4.17", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", "chokidar": "^3.6.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", "fast-glob": "^3.3.2", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "jiti": "^1.21.6", "lilconfig": "^3.1.3", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.1.1", "postcss": "^8.4.47", "postcss-import": "^15.1.0", "postcss-js": "^4.0.1", "postcss-load-config": "^4.0.2", "postcss-nested": "^6.2.0", "postcss-selector-parser": "^6.1.2", "resolve": "^1.22.8", "sucrase": "^3.35.0" }, "bin": { "tailwind": "lib/cli.js", "tailwindcss": "lib/cli.js" } }, "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og=="], + + "tailwindcss-animate": ["tailwindcss-animate@1.0.7", "", { "peerDependencies": { "tailwindcss": ">=3.0.0 || insiders" } }, "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA=="], + + "thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="], + + "thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="], + + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + + "ts-interface-checker": ["ts-interface-checker@0.1.13", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="], + + "tslib": ["tslib@2.4.1", "", {}, "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="], + + "type-fest": ["type-fest@4.33.0", "", {}, "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g=="], + + "typescript": ["typescript@5.7.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw=="], + + "undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="], + + "use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="], + + "use-sidecar": ["use-sidecar@1.1.3", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="], + + "use-sync-external-store": ["use-sync-external-store@1.4.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw=="], + + "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], + + "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + + "wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], + + "wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "yaml": ["yaml@2.7.0", "", { "bin": "bin.mjs" }, "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA=="], + + "zod": ["zod@3.24.1", "", {}, "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A=="], + + "@clerk/backend/tslib": ["tslib@2.4.1", "", {}, "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="], + + "@clerk/clerk-react/tslib": ["tslib@2.4.1", "", {}, "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="], + + "@clerk/types/csstype": ["csstype@3.1.1", "", {}, "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="], + + "@emnapi/runtime/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "@swc/helpers/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "aria-hidden/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "chokidar/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + + "dot-case/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + + "lower-case/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], + + "no-case/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "react-remove-scroll/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "react-remove-scroll-bar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "react-style-singleton/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "snake-case/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "string-width-cjs/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "string-width-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "strip-ansi-cjs/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "use-callback-ref/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "use-sidecar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "wrap-ansi-cjs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "wrap-ansi-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "string-width-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "wrap-ansi-cjs/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "wrap-ansi-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + } +} diff --git a/package.json b/package.json index 30ba436..fd9100b 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,10 @@ "axios": "^1.7.9", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "init": "^0.1.2", "lucide-react": "^0.474.0", "next": "15.1.6", + "prisma": "^6.3.1", "react": "^19.0.0", "react-dom": "^19.0.0", "react-hook-form": "^7.54.2", From 53360465b96efa212adfbb3d4cdd3e0e079b7ebe Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 14:21:56 +0600 Subject: [PATCH 064/706] db on postgresl --- bun.lock | 7 +++---- package.json | 1 + .../(dashboard)/(routes)/teacher/create/page.tsx | 1 + src/lib/db.ts | 8 ++++++++ 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 src/lib/db.ts diff --git a/bun.lock b/bun.lock index 995c6ca..dde289b 100644 --- a/bun.lock +++ b/bun.lock @@ -6,6 +6,7 @@ "dependencies": { "@clerk/nextjs": "^6.11.0", "@hookform/resolvers": "^3.10.0", + "@prisma/client": "^6.3.1", "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-label": "^2.1.1", "@radix-ui/react-slot": "^1.1.1", @@ -128,6 +129,8 @@ "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], + "@prisma/client": ["@prisma/client@6.3.1", "", { "peerDependencies": { "prisma": "*", "typescript": ">=5.1.0" }, "optionalPeers": ["prisma", "typescript"] }, "sha512-ARAJaPs+eBkemdky/XU3cvGRl+mIPHCN2lCXsl5Vlb0E2gV+R6IN7aCI8CisRGszEZondwIsW9Iz8EJkTdykyA=="], + "@prisma/debug": ["@prisma/debug@6.3.1", "", {}, "sha512-RrEBkd+HLZx+ydfmYT0jUj7wjLiS95wfTOSQ+8FQbvb6vHh5AeKfEPt/XUQ5+Buljj8hltEfOslEW57/wQIVeA=="], "@prisma/engines": ["@prisma/engines@6.3.1", "", { "dependencies": { "@prisma/debug": "6.3.1", "@prisma/engines-version": "6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0", "@prisma/fetch-engine": "6.3.1", "@prisma/get-platform": "6.3.1" } }, "sha512-sXdqEVLyGAJ5/iUoG/Ea5AdHMN71m6PzMBWRQnLmhhOejzqAaEr8rUd623ql6OJpED4s/U4vIn4dg1qkF7vGag=="], @@ -496,10 +499,6 @@ "zod": ["zod@3.24.1", "", {}, "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A=="], - "@clerk/backend/tslib": ["tslib@2.4.1", "", {}, "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="], - - "@clerk/clerk-react/tslib": ["tslib@2.4.1", "", {}, "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="], - "@clerk/types/csstype": ["csstype@3.1.1", "", {}, "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="], "@emnapi/runtime/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], diff --git a/package.json b/package.json index fd9100b..29fc6d9 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "@clerk/nextjs": "^6.11.0", "@hookform/resolvers": "^3.10.0", + "@prisma/client": "^6.3.1", "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-label": "^2.1.1", "@radix-ui/react-slot": "^1.1.1", diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 0120369..516ee87 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -9,6 +9,7 @@ import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessa import { Input } from '@/components/ui/input'; import {router} from "next/client"; import toast from "react-hot-toast"; +import axios from "axios"; const formSchema = z.object({ title: z.string().min(1, { message: 'Title is required' }) diff --git a/src/lib/db.ts b/src/lib/db.ts new file mode 100644 index 0000000..4e9e999 --- /dev/null +++ b/src/lib/db.ts @@ -0,0 +1,8 @@ +import {PrismaClient} from "@prisma/client"; + +declare global { + var prisma: PrismaClient | undefined; + +} +const db = globalThis.prisma || new PrismaClient(); +if(process.env.NODE_ENV !== 'production') globalThis.prisma = db From 93e6b5859b5f1c9ffecaa810bf40f1fcea6da952 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 14:24:09 +0600 Subject: [PATCH 065/706] ? --- package-lock.json | 124 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 124 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 492af61..f0ccd2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@clerk/nextjs": "^6.11.0", "@hookform/resolvers": "^3.10.0", + "@prisma/client": "^6.3.1", "@radix-ui/react-dialog": "^1.1.5", "@radix-ui/react-label": "^2.1.1", "@radix-ui/react-slot": "^1.1.1", @@ -17,6 +18,7 @@ "axios": "^1.7.9", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "init": "^0.1.2", "lucide-react": "^0.474.0", "next": "15.1.6", "react": "^19.0.0", @@ -32,6 +34,7 @@ "@types/react": "^19", "@types/react-dom": "^19", "postcss": "^8", + "prisma": "^6.3.1", "tailwindcss": "^3.4.1", "typescript": "^5" } @@ -795,6 +798,78 @@ "node": ">=14" } }, + "node_modules/@prisma/client": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.3.1.tgz", + "integrity": "sha512-ARAJaPs+eBkemdky/XU3cvGRl+mIPHCN2lCXsl5Vlb0E2gV+R6IN7aCI8CisRGszEZondwIsW9Iz8EJkTdykyA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "peerDependencies": { + "prisma": "*", + "typescript": ">=5.1.0" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/@prisma/debug": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.3.1.tgz", + "integrity": "sha512-RrEBkd+HLZx+ydfmYT0jUj7wjLiS95wfTOSQ+8FQbvb6vHh5AeKfEPt/XUQ5+Buljj8hltEfOslEW57/wQIVeA==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.3.1.tgz", + "integrity": "sha512-sXdqEVLyGAJ5/iUoG/Ea5AdHMN71m6PzMBWRQnLmhhOejzqAaEr8rUd623ql6OJpED4s/U4vIn4dg1qkF7vGag==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.3.1", + "@prisma/engines-version": "6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0", + "@prisma/fetch-engine": "6.3.1", + "@prisma/get-platform": "6.3.1" + } + }, + "node_modules/@prisma/engines-version": { + "version": "6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0.tgz", + "integrity": "sha512-R/ZcMuaWZT2UBmgX3Ko6PAV3f8//ZzsjRIG1eKqp3f2rqEqVtCv+mtzuH2rBPUC9ujJ5kCb9wwpxeyCkLcHVyA==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.3.1.tgz", + "integrity": "sha512-HOf/0umOgt+/S2xtZze+FHKoxpVg4YpVxROr6g2YG09VsI3Ipyb+rGvD6QGbCqkq5NTWAAZoOGNL+oy7t+IhaQ==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.3.1", + "@prisma/engines-version": "6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0", + "@prisma/get-platform": "6.3.1" + } + }, + "node_modules/@prisma/get-platform": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.3.1.tgz", + "integrity": "sha512-AYLq6Hk9xG73JdLWJ3Ip9Wg/vlP7xPvftGBalsPzKDOHr/ImhwJ09eS8xC2vNT12DlzGxhfk8BkL0ve2OriNhQ==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.3.1" + } + }, "node_modules/@radix-ui/primitive": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.1.tgz", @@ -1529,6 +1604,14 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "license": "MIT" }, + "node_modules/daemon": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/daemon/-/daemon-1.1.0.tgz", + "integrity": "sha512-1vX9YVcP21gt12nSD3SQRC/uPU7fyA6M8qyClTBIFuiRWoylFn57PwXhjBAqRl085bZAje7sILhZU48qcS9SWw==", + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1787,6 +1870,17 @@ "node": ">= 0.4" } }, + "node_modules/init": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/init/-/init-0.1.2.tgz", + "integrity": "sha512-IvHUjULS2q+BXJdiu4FHkByh3+qSFmkOXQ2ItSfYTtkdUksQc0yNX6f1uDyokzRV71tjpFsFc3ckeYLJXunTGw==", + "dependencies": { + "daemon": ">=0.3.0" + }, + "engines": { + "node": ">=0.4.7" + } + }, "node_modules/is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", @@ -2384,6 +2478,34 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "license": "MIT" }, + "node_modules/prisma": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.3.1.tgz", + "integrity": "sha512-JKCZWvBC3enxk51tY4TWzS4b5iRt4sSU1uHn2I183giZTvonXaQonzVtjLzpOHE7qu9MxY510kAtFGJwryKe3Q==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/engines": "6.3.1" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=18.18" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + }, + "peerDependencies": { + "typescript": ">=5.1.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -3045,7 +3167,7 @@ "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 29fc6d9..d138d2e 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "init": "^0.1.2", "lucide-react": "^0.474.0", "next": "15.1.6", - "prisma": "^6.3.1", "react": "^19.0.0", "react-dom": "^19.0.0", "react-hook-form": "^7.54.2", @@ -36,6 +35,7 @@ "@types/react": "^19", "@types/react-dom": "^19", "postcss": "^8", + "prisma": "^6.3.1", "tailwindcss": "^3.4.1", "typescript": "^5" } From 74c9121eab24e54d2d8890f236c907c8f18d0dc0 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 14:25:33 +0600 Subject: [PATCH 066/706] schema prisma init --- prisma/schema.prisma | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 prisma/schema.prisma diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..cc10721 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,8 @@ +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} From 578808d1b27537a56f7b2cd33e859ac0d661eb23 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 14:33:36 +0600 Subject: [PATCH 067/706] model created --- prisma/schema.prisma | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index cc10721..2da4fd8 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -6,3 +6,8 @@ datasource db { provider = "postgresql" url = env("DATABASE_URL") } + +model Course { + id String @id @default(cuid()) + userId String +} From 727db6d129ff449abdafa8278701f0a41063c6bb Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 15:02:27 +0600 Subject: [PATCH 068/706] custmoize settings view on webstorm --- prisma/schema.prisma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2da4fd8..9a7fdc4 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -8,6 +8,6 @@ datasource db { } model Course { - id String @id @default(cuid()) + id String @id @default(cuid()) userId String } From 2a069d8a44f32fa67033d143440defb2486b28bc Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 15:06:09 +0600 Subject: [PATCH 069/706] creating model on prisma --- prisma/schema.prisma | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 9a7fdc4..7d1918e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -8,6 +8,22 @@ datasource db { } model Course { - id String @id @default(cuid()) - userId String + id String @id @default(cuid()) + userId String + title String? + description String? + imageUrl String? + price Float? + isPublished Boolean @default(false) + categoryId String? + attachments Attachment[] + createdAt DateTime @default(now()) + updateAt DateTime @updatedAt + + @@map("courses") +} + +model Attachment{ + + } From 050d19b02d89cea8393a8aec6c3d12071f35f3f1 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 15:08:35 +0600 Subject: [PATCH 070/706] still writing model --- prisma/schema.prisma | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 7d1918e..d4d3b18 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -7,6 +7,11 @@ datasource db { url = env("DATABASE_URL") } +model Category{ + + +} + model Course { id String @id @default(cuid()) userId String @@ -23,7 +28,13 @@ model Course { @@map("courses") } -model Attachment{ - +model Attachment { + id String @id @default(cuid()) + url String + Course Course? @relation(fields: [courseId], references: [id]) + courseId String? + createdAt DateTime @default(now()) + updateAt DateTime @updatedAt + @@map("attachments") } From abfc901a021952bd4fe826e84469e6e14817b91f Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Wed, 5 Feb 2025 15:11:34 +0600 Subject: [PATCH 071/706] stillmodel --- prisma/schema.prisma | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index d4d3b18..90781f0 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -7,9 +7,11 @@ datasource db { url = env("DATABASE_URL") } -model Category{ - - +model Category { + id String @id @default(cuid()) + userId String + name String @unique + course Course[] } model Course { @@ -24,6 +26,7 @@ model Course { attachments Attachment[] createdAt DateTime @default(now()) updateAt DateTime @updatedAt + Category Category? @relation(fields: [categoryId], references: [id]) @@map("courses") } From 9feb9acfea1692a0121663013d6a74c7e3a60fb9 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:05:38 +0600 Subject: [PATCH 072/706] schema rpisma creates --- prisma/schema.prisma | 8 ++++---- .../(platform)/(dashboard)/components/SideBarRoutes.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 90781f0..78d0260 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -17,9 +17,9 @@ model Category { model Course { id String @id @default(cuid()) userId String - title String? - description String? - imageUrl String? + title String? @db.Text + description String? @db.Text + imageUrl String? @db.Text price Float? isPublished Boolean @default(false) categoryId String? @@ -33,7 +33,7 @@ model Course { model Attachment { id String @id @default(cuid()) - url String + url String @db.Text Course Course? @relation(fields: [courseId], references: [id]) courseId String? createdAt DateTime @default(now()) diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx index 7287c69..e27eafd 100644 --- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx +++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx @@ -46,7 +46,7 @@ const teacherRoutes = [ export default function SideBarRoutes() { const pathname = usePathname(); - const isTeacherPage = pathname.startsWith("/teacher"); // Предположим, что это определяет, является ли текущая страница страницей учителя + const isTeacherPage = pathname.startsWith("/teacher"); const routes = isTeacherPage ? teacherRoutes : guestRoutes; return ( From e0a2e6696a1777c556d3028f59cfc8a40134ba26 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:10:08 +0600 Subject: [PATCH 073/706] route ts async customize --- src/app/api/courses/route.ts | 19 +++++++++++++++++++ src/app/test/page.tsx | 11 ----------- src/lib/db.ts | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 src/app/api/courses/route.ts delete mode 100644 src/app/test/page.tsx diff --git a/src/app/api/courses/route.ts b/src/app/api/courses/route.ts new file mode 100644 index 0000000..a39251a --- /dev/null +++ b/src/app/api/courses/route.ts @@ -0,0 +1,19 @@ +import {auth} from "@clerk/nextjs/server"; +import {NextResponse} from "next/server"; + +export async function POST( + + req:Request + +) { + try { + const {userId} = auth() + const {title} = await req.json + if(!userId) + return new NextResponse("Unauthorized") + } + catch (error) { + error + + } +} \ No newline at end of file diff --git a/src/app/test/page.tsx b/src/app/test/page.tsx deleted file mode 100644 index 2d4a5e1..0000000 --- a/src/app/test/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ - - export default function TestPage () { - return ( -
- this should be un protected - -
- ); -}; - - diff --git a/src/lib/db.ts b/src/lib/db.ts index 4e9e999..d27d3bd 100644 --- a/src/lib/db.ts +++ b/src/lib/db.ts @@ -6,3 +6,4 @@ declare global { } const db = globalThis.prisma || new PrismaClient(); if(process.env.NODE_ENV !== 'production') globalThis.prisma = db + \ No newline at end of file From ff90e2a82aff64174daab6681151de7515540cca Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:13:22 +0600 Subject: [PATCH 074/706] still customize route ts --- src/app/api/courses/route.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/api/courses/route.ts b/src/app/api/courses/route.ts index a39251a..054befd 100644 --- a/src/app/api/courses/route.ts +++ b/src/app/api/courses/route.ts @@ -12,8 +12,18 @@ export async function POST( if(!userId) return new NextResponse("Unauthorized") } + const course = await db.course.create({ + data:{ + userId, + title + + } + + }) + catch (error) { - error + console.log('[COURSES]', error); + return new NextResponse("Internal Error", {status: 500}) } } \ No newline at end of file From 6b15925b2e65cdce812ed276140a4b073dfe1c42 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:16:09 +0600 Subject: [PATCH 075/706] schema --- src/app/api/courses/route.ts | 41 +++++++++++++++++------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/src/app/api/courses/route.ts b/src/app/api/courses/route.ts index 054befd..ffa58d8 100644 --- a/src/app/api/courses/route.ts +++ b/src/app/api/courses/route.ts @@ -1,29 +1,26 @@ -import {auth} from "@clerk/nextjs/server"; -import {NextResponse} from "next/server"; +import { auth } from "@clerk/nextjs/server"; +import { NextResponse } from "next/server"; -export async function POST( - - req:Request - -) { +export async function POST(req: Request) { try { - const {userId} = auth() - const {title} = await req.json - if(!userId) - return new NextResponse("Unauthorized") - } - const course = await db.course.create({ - data:{ - userId, - title - + const { userId } = await auth(); + if (!userId) { + return new NextResponse("Unauthorized", { status: 401 }); } - }) + const { title } = await req.json(); - catch (error) { - console.log('[COURSES]', error); - return new NextResponse("Internal Error", {status: 500}) + const course = await db.course.create({ + data: { + userId, + title, + }, + }); + + return NextResponse.json(course); + } catch (error) { + console.log('[COURSES]', error); + return new NextResponse("Internal Error", { status: 500 }); } -} \ No newline at end of file +} From 5a8bd865c2e81eb5a347d7ac4a17007589582b21 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:20:50 +0600 Subject: [PATCH 076/706] created POST uery --- src/app/api/courses/route.ts | 4 +++- src/lib/db.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/api/courses/route.ts b/src/app/api/courses/route.ts index ffa58d8..bca9524 100644 --- a/src/app/api/courses/route.ts +++ b/src/app/api/courses/route.ts @@ -1,6 +1,6 @@ import { auth } from "@clerk/nextjs/server"; import { NextResponse } from "next/server"; - +import {db} from "@/lib/db" export async function POST(req: Request) { try { const { userId } = await auth(); @@ -16,6 +16,8 @@ export async function POST(req: Request) { title, }, }); + return NextResponse.json(course); + return NextResponse.json(course); diff --git a/src/lib/db.ts b/src/lib/db.ts index d27d3bd..1cb1211 100644 --- a/src/lib/db.ts +++ b/src/lib/db.ts @@ -6,4 +6,4 @@ declare global { } const db = globalThis.prisma || new PrismaClient(); if(process.env.NODE_ENV !== 'production') globalThis.prisma = db - \ No newline at end of file + export {db} \ No newline at end of file From 5c6ca8d1323017f9f0ded960b62400fe2747fb75 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:24:10 +0600 Subject: [PATCH 077/706] return to create page on sidebar --- .../(platform)/(dashboard)/(routes)/teacher/create/page.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 516ee87..9d17c11 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -27,8 +27,9 @@ export default function CreatePage() { const onSubmit = async (values: z.infer) => { try { - const response = await axios.post('/api/courses,values'); + const response = await axios.post('/api/courses',values); router.push(`/teacher/courses/${response.data.id}`); + toast.success('Course successfully created!'); }catch(error) { toast.error('something went wrong'); } From 3ebed8376f8f700612ccb2524ce8401d251ef029 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:30:39 +0600 Subject: [PATCH 078/706] bug have --- src/app/api/courses/route.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/api/courses/route.ts b/src/app/api/courses/route.ts index bca9524..54b9668 100644 --- a/src/app/api/courses/route.ts +++ b/src/app/api/courses/route.ts @@ -3,12 +3,13 @@ import { NextResponse } from "next/server"; import {db} from "@/lib/db" export async function POST(req: Request) { try { - const { userId } = await auth(); + + const { userId } = await auth(); + const { title } = await req.json(); if (!userId) { return new NextResponse("Unauthorized", { status: 401 }); } - const { title } = await req.json(); const course = await db.course.create({ data: { @@ -17,10 +18,6 @@ export async function POST(req: Request) { }, }); return NextResponse.json(course); - - - return NextResponse.json(course); - } catch (error) { console.log('[COURSES]', error); return new NextResponse("Internal Error", { status: 500 }); From 3a1a1712207483bf2eb422706453511507c011b7 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:40:49 +0600 Subject: [PATCH 079/706] fixed some bugs --- .../(routes)/teacher/create/page.tsx | 21 ++++++++++--------- middleware.ts => src/middleware.ts | 0 2 files changed, 11 insertions(+), 10 deletions(-) rename middleware.ts => src/middleware.ts (100%) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx index 9d17c11..bb7e2a9 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx @@ -4,10 +4,10 @@ import { z } from 'zod'; import { useForm, FormProvider } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; import Link from 'next/link'; +import { useRouter } from 'next/navigation'; import { Button } from '@/components/ui/button'; import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import {router} from "next/client"; import toast from "react-hot-toast"; import axios from "axios"; @@ -16,6 +16,7 @@ const formSchema = z.object({ }); export default function CreatePage() { + const router = useRouter(); const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { @@ -23,16 +24,16 @@ export default function CreatePage() { } }); - const { isValid, isSubmitting, errors } = form.formState; + const {isSubmitting ,isValid} = form.formState; const onSubmit = async (values: z.infer) => { -try { - const response = await axios.post('/api/courses',values); - router.push(`/teacher/courses/${response.data.id}`); - toast.success('Course successfully created!'); -}catch(error) { - toast.error('something went wrong'); -} + try { + const response = await axios.post('/api/courses', values); + router.push(`/teacher/courses/${response.data.id}`); + toast.success('Course successfully created!'); + } catch { + toast.error('Something went wrong'); + } }; return ( @@ -59,7 +60,7 @@ try { /> What will you teach in this course? - {errors.title && {errors.title.message}} + {/* ✅ Теперь ошибки отображаются правильно */} )} /> diff --git a/middleware.ts b/src/middleware.ts similarity index 100% rename from middleware.ts rename to src/middleware.ts From 9dbcbbd1dc8856e5c0b2759ec20eb2612c94624d Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:48:27 +0600 Subject: [PATCH 080/706] courseIdpage writing after created course on tech mode --- .../teacher/courses/[courseId]/page.tsx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx new file mode 100644 index 0000000..8341424 --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -0,0 +1,28 @@ +'use client' +import {db} from "@/lib/db"; +import {auth} from "@clerk/nextjs/server"; +import {redirect} from "next/navigation"; + +const CourseIdPagePage = async({params}: {params:{courseId: string}})=> { + + const {userId} = await auth() + if(!userId){ + return redirect("/"); + } + + const course = await db.course.findUnique({ + where: { + id: params.courseId, + } + }) + + + return ( +
+ CourseIdPagePage + +
+ ); +}; + + From f05831483031fca39a6bcd1c4e0607596a2c3090 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 13:51:26 +0600 Subject: [PATCH 081/706] courseIDPage coding --- .../(routes)/teacher/courses/[courseId]/page.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 8341424..fbb7b64 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -10,11 +10,24 @@ const CourseIdPagePage = async({params}: {params:{courseId: string}})=> { return redirect("/"); } + const course = await db.course.findUnique({ where: { id: params.courseId, } }) + if(!course){ + return redirect("/"); + } + + const requiredFields = [ + course.title, + course.description, + course.imageUrl, + course.price, + course.categoryId, + ] + return ( From c1e701da2116c28b1c7c86a06ccf27976b5a23e0 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 14:00:25 +0600 Subject: [PATCH 082/706] setup comtpled course --- .../teacher/courses/[courseId]/page.tsx | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index fbb7b64..a37dd38 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -1,4 +1,4 @@ -'use client' + import {db} from "@/lib/db"; import {auth} from "@clerk/nextjs/server"; import {redirect} from "next/navigation"; @@ -27,15 +27,27 @@ const CourseIdPagePage = async({params}: {params:{courseId: string}})=> { course.price, course.categoryId, ] - - - + const totalFields = requiredFields.length; + const completedFields = requiredFields.filter(Boolean).length; +const completionText = `(${completedFields}/${totalFields})` return ( -
+
+
+
+

+ Course Setup +

+ + + Completed fields {completionText} + + +
+
CourseIdPagePage
); }; - +export default CourseIdPagePage; \ No newline at end of file From 8abae30b341f2ff2e39001ad1c6b0c1a25702307 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 14:01:24 +0600 Subject: [PATCH 083/706] setup to completed course --- .../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index a37dd38..49e415b 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -44,7 +44,7 @@ const completionText = `(${completedFields}/${totalFields})`
- CourseIdPagePage + ); From 602d6906d701cf15cdea887a4964a802adf8baa6 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 14:04:24 +0600 Subject: [PATCH 084/706] courseIdpage completed --- .../(routes)/teacher/courses/[courseId]/page.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 49e415b..75a093c 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -44,8 +44,17 @@ const completionText = `(${completedFields}/${totalFields})` +
+
+
+

+ Costomize your course +

+
+
+ +
- ); }; From 9539de8de17309e34d0eb9ec4c7417c4b52d1abe Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 14:08:42 +0600 Subject: [PATCH 085/706] icons end --- src/components/icon-badge.tsx | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/components/icon-badge.tsx diff --git a/src/components/icon-badge.tsx b/src/components/icon-badge.tsx new file mode 100644 index 0000000..e69de29 From 94c9baed077038c3b828c40b88d8180695cdba8d Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 20:56:13 +0600 Subject: [PATCH 086/706] writing style --- src/components/icon-badge.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/components/icon-badge.tsx b/src/components/icon-badge.tsx index e69de29..006849a 100644 --- a/src/components/icon-badge.tsx +++ b/src/components/icon-badge.tsx @@ -0,0 +1,19 @@ +const backgroundVariants= cva( + 'rounded-full flex items-center justify-center', + {variants: { + variant: { + default: 'bg-sky-100', + success: 'bg-emerald-100', + }, + iconVariant: { + default: 'text-sky-100', + success: 'text-emerald-700', + }, + size: { + default: 'p-2', + } + + + }} + +) \ No newline at end of file From c5ad285be98c04643879d2e2045103ef84376710 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 21:03:14 +0600 Subject: [PATCH 087/706] writing style for edit page onsidebar tech mode --- src/components/icon-badge.tsx | 37 ++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/components/icon-badge.tsx b/src/components/icon-badge.tsx index 006849a..04a83fe 100644 --- a/src/components/icon-badge.tsx +++ b/src/components/icon-badge.tsx @@ -1,3 +1,5 @@ +import {cva, type VariantProps} from "class-variance-authority"; + const backgroundVariants= cva( 'rounded-full flex items-center justify-center', {variants: { @@ -11,9 +13,38 @@ const backgroundVariants= cva( }, size: { default: 'p-2', - } + sm: 'p-1', + }, + }, + defaultVarianst: { + variant: 'default', + size: 'default', + }, + }, +) +const iconVariants = cva( + '',{ + variants: { + variant: { + default: 'text-sky-700', + success: 'text-emerald-700', + }, + size: { + default: 'p-2', + sm: 'p-1', + }, + } + defaultVarianst: { + variant: 'default', + size: 'default', + } + + } +) + +type BackgroundVariantsProps = VariantProps; +type IconVariantsProps = VariantProps; + - }} -) \ No newline at end of file From 99a4762847502632d866382449b2aa3979f699cc Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 21:07:53 +0600 Subject: [PATCH 088/706] creating style issue --- src/components/icon-badge.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/icon-badge.tsx b/src/components/icon-badge.tsx index 04a83fe..06088e8 100644 --- a/src/components/icon-badge.tsx +++ b/src/components/icon-badge.tsx @@ -1,4 +1,6 @@ import {cva, type VariantProps} from "class-variance-authority"; +import {allowedDisplayValues} from "next/dist/compiled/@next/font/dist/constants"; +import {cn} from "@/lib/utils"; const backgroundVariants= cva( 'rounded-full flex items-center justify-center', @@ -45,6 +47,17 @@ const iconVariants = cva( type BackgroundVariantsProps = VariantProps; type IconVariantsProps = VariantProps; +interface IconBadgeProps extends BackgroundVariantsProps ,IconVariantsProps{ + export const IconBadge = ({ + icon: Icon, + variant, + size + } : IconBadgeProps) => { +
+ +
+} +} \ No newline at end of file From b9321f38b50ab934746d466b9fea4118e095b81a Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 21:13:00 +0600 Subject: [PATCH 089/706] finished the style| edit page,tech mode. fixed syntax bug on style --- src/components/icon-badge.tsx | 91 ++++++++++++++++------------------- 1 file changed, 41 insertions(+), 50 deletions(-) diff --git a/src/components/icon-badge.tsx b/src/components/icon-badge.tsx index 06088e8..d38e185 100644 --- a/src/components/icon-badge.tsx +++ b/src/components/icon-badge.tsx @@ -1,63 +1,54 @@ -import {cva, type VariantProps} from "class-variance-authority"; -import {allowedDisplayValues} from "next/dist/compiled/@next/font/dist/constants"; -import {cn} from "@/lib/utils"; +import { cva, type VariantProps } from "class-variance-authority"; +import { cn } from "@/lib/utils"; -const backgroundVariants= cva( - 'rounded-full flex items-center justify-center', - {variants: { - variant: { - default: 'bg-sky-100', - success: 'bg-emerald-100', - }, - iconVariant: { - default: 'text-sky-100', - success: 'text-emerald-700', - }, - size: { - default: 'p-2', - sm: 'p-1', - }, - }, - defaultVarianst: { - variant: 'default', - size: 'default', - }, - }, -) -const iconVariants = cva( - '',{ +const backgroundVariants = cva( + "rounded-full flex items-center justify-center", + { variants: { variant: { - default: 'text-sky-700', - success: 'text-emerald-700', + default: "bg-sky-100", + success: "bg-emerald-100", }, size: { - default: 'p-2', - sm: 'p-1', + default: "p-2", + sm: "p-1", }, - } - defaultVarianst: { - variant: 'default', - size: 'default', - } - + }, + defaultVariants: { + variant: "default", + size: "default", + }, } -) +); + +const iconVariants = cva("", { + variants: { + variant: { + default: "text-sky-700", + success: "text-emerald-700", + }, + size: { + default: "p-2", + sm: "p-1", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, +}); type BackgroundVariantsProps = VariantProps; type IconVariantsProps = VariantProps; -interface IconBadgeProps extends BackgroundVariantsProps ,IconVariantsProps{ - export const IconBadge = ({ - icon: Icon, - variant, - size - } : IconBadgeProps) => { -
- - -
- +interface IconBadgeProps extends BackgroundVariantsProps, IconVariantsProps { + icon: React.ElementType; } -} \ No newline at end of file +export const IconBadge = ({ icon: Icon, variant, size }: IconBadgeProps) => { + return ( +
+ +
+ ); +}; From 1a21966be560a25e58384e0b0c089411ab5b347e Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:19:29 +0600 Subject: [PATCH 090/706] as --- .../(routes)/teacher/courses/[courseId]/page.tsx | 3 +++ src/components/icon-badge.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 75a093c..3741a53 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -2,6 +2,8 @@ import {db} from "@/lib/db"; import {auth} from "@clerk/nextjs/server"; import {redirect} from "next/navigation"; +import {IconBadge} from "@/components/icon-badge"; +import {LayoutDashboard, LayoutDashboardIcon} from "lucide-react"; const CourseIdPagePage = async({params}: {params:{courseId: string}})=> { @@ -47,6 +49,7 @@ const completionText = `(${completedFields}/${totalFields})`
+

Costomize your course

diff --git a/src/components/icon-badge.tsx b/src/components/icon-badge.tsx index d38e185..a837a42 100644 --- a/src/components/icon-badge.tsx +++ b/src/components/icon-badge.tsx @@ -10,8 +10,8 @@ const backgroundVariants = cva( success: "bg-emerald-100", }, size: { - default: "p-2", - sm: "p-1", + default: "p-2", // Больше отступ + sm: "p-1", // Меньше отступ }, }, defaultVariants: { @@ -28,8 +28,8 @@ const iconVariants = cva("", { success: "text-emerald-700", }, size: { - default: "p-2", - sm: "p-1", + default: "w-6 h-6", // 24px + sm: "w-4 h-4", // 16px }, }, defaultVariants: { From 72fc9c0ea13de014f2ca24183f2f22550424c574 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:22:45 +0600 Subject: [PATCH 091/706] as --- .../courses/[courseId]/components/title_form.tsx | 11 +++++++++++ .../(routes)/teacher/courses/[courseId]/page.tsx | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx new file mode 100644 index 0000000..605d4d5 --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -0,0 +1,11 @@ +'use client' +export default function TitleForm () { + return ( +
+ TitleForm + +
+ ); +}; + + diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 3741a53..6926c83 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -4,6 +4,7 @@ import {auth} from "@clerk/nextjs/server"; import {redirect} from "next/navigation"; import {IconBadge} from "@/components/icon-badge"; import {LayoutDashboard, LayoutDashboardIcon} from "lucide-react"; +import TitleForm from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form"; const CourseIdPagePage = async({params}: {params:{courseId: string}})=> { @@ -54,6 +55,9 @@ const completionText = `(${completedFields}/${totalFields})` Costomize your course
+ + +
From 1734c9085cfdfde967a9da5d2eda9b6b273eba03 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:25:18 +0600 Subject: [PATCH 092/706] interface for TitleForm --- .../courses/[courseId]/components/title_form.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 605d4d5..62f7ef0 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -1,5 +1,14 @@ 'use client' -export default function TitleForm () { +import * as z from 'zod' + +interface TitleFormProps{ + initalData:{ + + title:string + } +} + +export default function TitleForm ({initalData,courseId}: TitleFormProps)=> { return (
TitleForm From 9d85e3129be1c4d27fd7a571b7833a5c5623d6ec Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:28:06 +0600 Subject: [PATCH 093/706] customize --- .../teacher/courses/[courseId]/components/title_form.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 62f7ef0..0304997 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -1,14 +1,19 @@ 'use client' import * as z from 'zod' +import {useForm} from "react-hook-form"; interface TitleFormProps{ initalData:{ - title:string } } -export default function TitleForm ({initalData,courseId}: TitleFormProps)=> { +export const TitleForm =({initalData,courseId}: TitleFormProps)=> { + const form = useForm>({ + defaultValues: initalData + + }) + return (
TitleForm From 14a5d5af92cbe63c30c14e92ca288d417871235d Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:29:10 +0600 Subject: [PATCH 094/706] as --- .../teacher/courses/[courseId]/components/title_form.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 0304997..ed125a1 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -11,8 +11,9 @@ interface TitleFormProps{ export const TitleForm =({initalData,courseId}: TitleFormProps)=> { const form = useForm>({ defaultValues: initalData - }) + const {isSubmitting,isValid} = form.formState +const onSubmit=async (values) return (
From e9e2c95e6a1c7247502c7f38d070298ff1f78c4d Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:29:55 +0600 Subject: [PATCH 095/706] as --- .../teacher/courses/[courseId]/components/title_form.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index ed125a1..acec573 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -13,7 +13,10 @@ export const TitleForm =({initalData,courseId}: TitleFormProps)=> { defaultValues: initalData }) const {isSubmitting,isValid} = form.formState -const onSubmit=async (values) +const onSubmit=async (values:z.infer ) => { + console.log(values) + +} return (
From cb68e0d396af8ddf10f79aadc5969e69b26298ed Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:32:16 +0600 Subject: [PATCH 096/706] style writing --- .../teacher/courses/[courseId]/components/title_form.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index acec573..af67fda 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -19,9 +19,13 @@ const onSubmit=async (values:z.infer ) => { } return ( -
+
+
+ Course Title + +
+ TitleForm -
); }; From 55273ad1bd0d13590e549c089ed62eb578625f95 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:33:14 +0600 Subject: [PATCH 097/706] style writing --- .../teacher/courses/[courseId]/components/title_form.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index af67fda..5a7c9ac 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -1,6 +1,7 @@ 'use client' import * as z from 'zod' import {useForm} from "react-hook-form"; +import {Pencil} from "lucide-react"; interface TitleFormProps{ initalData:{ @@ -22,10 +23,11 @@ const onSubmit=async (values:z.infer ) => {
Course Title -
+
); }; From 674ff221eaa6f54633b7314148d8604e52129be5 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:34:09 +0600 Subject: [PATCH 098/706] style writing --- .../courses/[courseId]/components/title_form.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 5a7c9ac..cb40505 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -25,6 +25,18 @@ const onSubmit=async (values:z.infer ) => { Course Title
From 586422253204053c7b91d33ac74a211b735e032d Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:35:54 +0600 Subject: [PATCH 099/706] style writing --- .../teacher/courses/[courseId]/components/title_form.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index cb40505..4a3f8f3 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -10,6 +10,9 @@ interface TitleFormProps{ } export const TitleForm =({initalData,courseId}: TitleFormProps)=> { + const [ isEditing,setIsEditting] = useState() + const toggleEdit = () => set + const form = useForm>({ defaultValues: initalData }) @@ -32,7 +35,7 @@ const onSubmit=async (values:z.infer ) => { )}{ isEditting && ( <> - ) From 4002dc7b5e84aa5be7c28ac8f66fd6dab728ee71 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:38:13 +0600 Subject: [PATCH 100/706] style writing --- .../teacher/courses/[courseId]/components/title_form.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 4a3f8f3..a23ddac 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -2,6 +2,7 @@ import * as z from 'zod' import {useForm} from "react-hook-form"; import {Pencil} from "lucide-react"; +import {defaultOverrides} from "next/dist/server/require-hook"; interface TitleFormProps{ initalData:{ @@ -11,7 +12,7 @@ interface TitleFormProps{ export const TitleForm =({initalData,courseId}: TitleFormProps)=> { const [ isEditing,setIsEditting] = useState() - const toggleEdit = () => set + const toggleEdit = () => setIsEditting((current) => !current) const form = useForm>({ defaultValues: initalData @@ -43,7 +44,12 @@ const onSubmit=async (values:z.infer ) => { +
+ +
+ + ); }; From de963a136faca655eef6d30c525fa09120d59160 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:41:14 +0600 Subject: [PATCH 101/706] style writing --- .../teacher/courses/[courseId]/components/title_form.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index a23ddac..f884c5e 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -12,6 +12,8 @@ interface TitleFormProps{ export const TitleForm =({initalData,courseId}: TitleFormProps)=> { const [ isEditing,setIsEditting] = useState() + + const toggleEdit = () => setIsEditting((current) => !current) const form = useForm>({ @@ -19,6 +21,11 @@ export const TitleForm =({initalData,courseId}: TitleFormProps)=> { }) const {isSubmitting,isValid} = form.formState const onSubmit=async (values:z.infer ) => { + try { +await axios.patch(`/api/courses/${courseId}/courses/${courseId}/edit`,{}) + } + catch () + console.log(values) } From 5431ab07cd6dbde729c66242a0588e593de31b58 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:42:53 +0600 Subject: [PATCH 102/706] style writing --- src/app/api/courses/[courseId]/route.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/app/api/courses/[courseId]/route.ts diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts new file mode 100644 index 0000000..252bb65 --- /dev/null +++ b/src/app/api/courses/[courseId]/route.ts @@ -0,0 +1,11 @@ +'use client' +export default function `Page` () { + return ( +
+ `Page` + +
+ ); +}; + + From c31a24942f5ea9bcf8b9e589466df20c25a8f879 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:43:37 +0600 Subject: [PATCH 103/706] style writing --- src/app/api/courses/[courseId]/route.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 252bb65..66517fe 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -1,11 +1,12 @@ -'use client' -export default function `Page` () { - return ( -
- `Page` - -
- ); -}; +export async function PATCH( +req:Request +){ + try { + } + catch (){ + } + + +} \ No newline at end of file From 295f1efaee8c420b28e83b9f115d08523e8014ac Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:44:35 +0600 Subject: [PATCH 104/706] style writing --- src/app/api/courses/[courseId]/route.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 66517fe..b743bd3 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -2,10 +2,11 @@ export async function PATCH( req:Request ){ try { - +const {userId} = await auth() + const {courseId} = await auth() } catch (){ - + console.log() } From e9a6359489464c46528ccd8152b1239f3af9e00e Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:45:30 +0600 Subject: [PATCH 105/706] style writing --- src/app/api/courses/[courseId]/route.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index b743bd3..91d6fe0 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -1,10 +1,16 @@ +import {NextResponse} from "next/server"; + export async function PATCH( req:Request ){ try { const {userId} = await auth() const {courseId} = await auth() + if(!userId){ + return new NextResponse('Unauthorized', {status: 401}) + } } + catch(err){} catch (){ console.log() } From bebf0fd94ddbfbd9f3a3c7982b7269c45ad1d112 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Thu, 6 Feb 2025 23:46:02 +0600 Subject: [PATCH 106/706] style writing --- src/app/api/courses/[courseId]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 91d6fe0..0c911d3 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -10,7 +10,7 @@ const {userId} = await auth() return new NextResponse('Unauthorized', {status: 401}) } } - catch(err){} + const course = await db.course.update catch (){ console.log() } From f1f09fe70214d323de1dddd798ca7fbbaa626a24 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 11:43:33 +0600 Subject: [PATCH 107/706] async server customize --- src/app/api/courses/[courseId]/route.ts | 15 +++++++++++---- src/components/provider/toaster-provider.tsx | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 0c911d3..8595607 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -1,15 +1,22 @@ +import { auth } from "@clerk/nextjs/server"; import {NextResponse} from "next/server"; export async function PATCH( req:Request -){ +){ try { const {userId} = await auth() - const {courseId} = await auth() - if(!userId){ - return new NextResponse('Unauthorized', {status: 401}) +const {courseId} = params +if(!userId){ + return new NextResponse('Unauthorized', {status: 401}) } } + +if(!userId){ +return new NextResponse('Unauthorized', {status: 401}) + +} + const course = await db.course.update catch (){ console.log() diff --git a/src/components/provider/toaster-provider.tsx b/src/components/provider/toaster-provider.tsx index bc72a8e..3845182 100644 --- a/src/components/provider/toaster-provider.tsx +++ b/src/components/provider/toaster-provider.tsx @@ -6,3 +6,4 @@ export default function ToasterProvider () { }; + \ No newline at end of file From 185ce84a3174416646496d840f3d8bbc65ca8296 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 11:45:39 +0600 Subject: [PATCH 108/706] async server customize --- src/app/api/courses/[courseId]/route.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 8595607..71b310c 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -3,21 +3,23 @@ import {NextResponse} from "next/server"; export async function PATCH( req:Request +{params}: {params: {courseId: string}} + ){ try { -const {userId} = await auth() -const {courseId} = params + const {userId} = await auth() + const {courseId} = params + const values = await req.json() if(!userId){ return new NextResponse('Unauthorized', {status: 401}) } } - -if(!userId){ -return new NextResponse('Unauthorized', {status: 401}) - -} - - const course = await db.course.update + + if(!userId){ + return new NextResponse('Unauthorized', {status: 401}) + + } + const course = await db.course.update catch (){ console.log() } From 07fef7f392dd01b21cffcf867ec4d0025ae99a12 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 11:51:26 +0600 Subject: [PATCH 109/706] async server customize --- src/app/api/courses/[courseId]/route.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 71b310c..aac41c8 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -1,8 +1,9 @@ +import { db } from "@/lib/db"; import { auth } from "@clerk/nextjs/server"; import {NextResponse} from "next/server"; export async function PATCH( -req:Request +req:Request, {params}: {params: {courseId: string}} ){ @@ -13,13 +14,15 @@ req:Request if(!userId){ return new NextResponse('Unauthorized', {status: 401}) } - } + const course = await db.course.update({ +where: { - if(!userId){ - return new NextResponse('Unauthorized', {status: 401}) - - } - const course = await db.course.update +} + + }) + + } + } catch (){ console.log() } From 6616abf7a6c85ac3bdca3f531c4e34197bc98f3c Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 11:54:24 +0600 Subject: [PATCH 110/706] async server customize --- src/app/api/courses/[courseId]/route.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index aac41c8..1d988b1 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -14,15 +14,18 @@ req:Request, if(!userId){ return new NextResponse('Unauthorized', {status: 401}) } - const course = await db.course.update({ +const course = await db.course.update({ where: { - -} + id: params.courseId, + userId +}, - }) - - } - } + data:{ + ...values + } + }) + return NextResponse.json(courseId) + catch (){ console.log() } From e68f0dbcea56cb23ab33c26e7e2ce7ff4d76ad9a Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 11:56:05 +0600 Subject: [PATCH 111/706] async server customize --- src/app/api/courses/[courseId]/route.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 1d988b1..9902d28 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -26,9 +26,11 @@ where: { }) return NextResponse.json(courseId) - catch (){ - console.log() + catch (error){ + console.log('[COURSE_ID]',error) + return NextResponse.json('Interval server error', {status: 500}) + } -} \ No newline at end of file + }} From 383cab044fd7384acde638fcaa3fe41c945a1215 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 11:57:25 +0600 Subject: [PATCH 112/706] async server customize --- src/app/api/courses/[courseId]/route.ts | 52 +++++++++++-------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 9902d28..13c637a 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -1,36 +1,30 @@ import { db } from "@/lib/db"; import { auth } from "@clerk/nextjs/server"; -import {NextResponse} from "next/server"; +import { NextResponse } from "next/server"; -export async function PATCH( -req:Request, -{params}: {params: {courseId: string}} - -){ - try { - const {userId} = await auth() - const {courseId} = params - const values = await req.json() -if(!userId){ - return new NextResponse('Unauthorized', {status: 401}) - } -const course = await db.course.update({ -where: { - id: params.courseId, - userId -}, - - data:{ - ...values - } - }) - return NextResponse.json(courseId) - - catch (error){ - console.log('[COURSE_ID]',error) - return NextResponse.json('Interval server error', {status: 500}) +export async function PATCH(req: Request, { params }: { params: { courseId: string } }) { + try { + const { userId } = await auth(); + const { courseId } = params; + const values = await req.json(); + if (!userId) { + return new NextResponse("Unauthorized", { status: 401 }); } + const course = await db.course.update({ + where: { + id: courseId, + userId, + }, + data: { + ...values, + }, + }); - }} + return NextResponse.json(course); + } catch (error) { + console.log("[COURSE_ID]", error); + return new NextResponse("Internal server error", { status: 500 }); + } +} From 96bee49231a817a8965d8878353cd20f60c00acd Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 12:03:15 +0600 Subject: [PATCH 113/706] async server customize --- .../[courseId]/components/title_form.tsx | 106 +++++++++--------- 1 file changed, 54 insertions(+), 52 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index f884c5e..1a77511 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -1,63 +1,65 @@ -'use client' -import * as z from 'zod' -import {useForm} from "react-hook-form"; -import {Pencil} from "lucide-react"; -import {defaultOverrides} from "next/dist/server/require-hook"; - -interface TitleFormProps{ - initalData:{ - title:string - } +"use client"; +import React, { useState } from "react"; +import * as z from "zod"; +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import axios from "axios"; +import { Pencil } from "lucide-react"; +import { Button } from "@/components/ui/button"; + +const formSchema = z.object({ + title: z.string().min(1, "Title is required"), +}); + +interface TitleFormProps { + initialData: { + title: string; + }; + courseId: string; } -export const TitleForm =({initalData,courseId}: TitleFormProps)=> { - const [ isEditing,setIsEditting] = useState() - +export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { + const [isEditing, setIsEditing] = useState(false); - const toggleEdit = () => setIsEditting((current) => !current) + const toggleEdit = () => setIsEditing((current) => !current); - const form = useForm>({ - defaultValues: initalData - }) - const {isSubmitting,isValid} = form.formState -const onSubmit=async (values:z.infer ) => { - try { -await axios.patch(`/api/courses/${courseId}/courses/${courseId}/edit`,{}) - } - catch () + const form = useForm>({ + resolver: zodResolver(formSchema), + defaultValues: initialData, + }); - console.log(values) + const { isSubmitting, isValid } = form.formState; -} + const onSubmit = async (values: z.infer) => { + try { + await axios.patch(`/api/courses/${courseId}/edit`, values); + toggleEdit(); + } catch (error) { + console.error("Ошибка при обновлении курса:", error); + } + console.log(values); + }; return ( -
-
- Course Title -
- -
- -
+
+
Course Title
+ + {isEditing && ( +
+ + +
+ )}
- - ); }; - - From 972c8059587aa784d5739ce78f4e58a8a7551012 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 12:03:47 +0600 Subject: [PATCH 114/706] async server customize --- .../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 6926c83..7abacc8 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -4,7 +4,7 @@ import {auth} from "@clerk/nextjs/server"; import {redirect} from "next/navigation"; import {IconBadge} from "@/components/icon-badge"; import {LayoutDashboard, LayoutDashboardIcon} from "lucide-react"; -import TitleForm from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form"; +import { TitleForm } from "./components/title_form"; const CourseIdPagePage = async({params}: {params:{courseId: string}})=> { From 2ff3761aa53f29a48d551b022e2f54092d65eba2 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 12:35:40 +0600 Subject: [PATCH 115/706] async server customize --- .../teacher/courses/[courseId]/components/title_form.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 1a77511..19f0836 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -17,18 +17,20 @@ interface TitleFormProps { }; courseId: string; } +const form = useForm>({ + title: z.string().min(1, { message: "Title is required" }), + defaultValues: initialData, +}); export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { const [isEditing, setIsEditing] = useState(false); - - const toggleEdit = () => setIsEditing((current) => !current); - const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: initialData, }); const { isSubmitting, isValid } = form.formState; + const toggleEdit = () => setIsEditing((current) => !current); const onSubmit = async (values: z.infer) => { try { From 893e370c3101371b00340c423b8e8def440813dc Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 12:38:33 +0600 Subject: [PATCH 116/706] still working --- .../[courseId]/components/title_form.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 19f0836..69f4b11 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -46,13 +46,17 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => {
Course Title
{isEditing && (
From 2a40cd0936ea88bcb2816e2c0ef09e07fda63fd9 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 12:40:53 +0600 Subject: [PATCH 117/706] still working --- .../[courseId]/components/title_form.tsx | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 69f4b11..0e82f4b 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -6,6 +6,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import axios from "axios"; import { Pencil } from "lucide-react"; import { Button } from "@/components/ui/button"; +import { Form, FormControl, FormField, FormItem } from "@/components/ui/form"; const formSchema = z.object({ title: z.string().min(1, "Title is required"), @@ -46,25 +47,30 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => {
Course Title
{isEditing && ( - + + + ( + + + + + )}> + - + )}
); From dc76f9e29583223ae749cfc9d026375d44cf0c9f Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 12:42:53 +0600 Subject: [PATCH 118/706] still working --- .../courses/[courseId]/components/title_form.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 0e82f4b..fc2a16a 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -7,6 +7,7 @@ import axios from "axios"; import { Pencil } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Form, FormControl, FormField, FormItem } from "@/components/ui/form"; +import { Input } from "@/components/ui/input"; const formSchema = z.object({ title: z.string().min(1, "Title is required"), @@ -61,14 +62,13 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => {
( - - + + + - )}>
- - - )} From 0f83d253437b0009fab498fd7d75aed1131c953a Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 12:48:01 +0600 Subject: [PATCH 119/706] now i am testing --- .../[courseId]/components/title_form.tsx | 29 +++--- .../teacher/courses/[courseId]/page.tsx | 98 ++++++++----------- 2 files changed, 55 insertions(+), 72 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index fc2a16a..38b020e 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -19,13 +19,10 @@ interface TitleFormProps { }; courseId: string; } -const form = useForm>({ - title: z.string().min(1, { message: "Title is required" }), - defaultValues: initialData, -}); export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { const [isEditing, setIsEditing] = useState(false); + const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: initialData, @@ -57,19 +54,25 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { )} + {isEditing && (
- - ( + + ( - - - + + + - )} - - - + )} + /> + + )}
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 7abacc8..35b2e88 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -1,69 +1,49 @@ - -import {db} from "@/lib/db"; -import {auth} from "@clerk/nextjs/server"; -import {redirect} from "next/navigation"; -import {IconBadge} from "@/components/icon-badge"; -import {LayoutDashboard, LayoutDashboardIcon} from "lucide-react"; +import { db } from "@/lib/db"; +import { auth } from "@clerk/nextjs/server"; +import { redirect } from "next/navigation"; +import { IconBadge } from "@/components/icon-badge"; +import { LayoutDashboard, LayoutDashboardIcon } from "lucide-react"; import { TitleForm } from "./components/title_form"; -const CourseIdPagePage = async({params}: {params:{courseId: string}})=> { - - const {userId} = await auth() - if(!userId){ - return redirect("/"); - } - +const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => { + const { userId } = await auth(); + if (!userId) { + return redirect("/"); + } const course = await db.course.findUnique({ - where: { - id: params.courseId, - } - }) - if(!course){ - return redirect("/"); - } - - const requiredFields = [ - course.title, - course.description, - course.imageUrl, - course.price, - course.categoryId, - ] - const totalFields = requiredFields.length; - const completedFields = requiredFields.filter(Boolean).length; -const completionText = `(${completedFields}/${totalFields})` - return ( -
-
-
-

- Course Setup -

- - - Completed fields {completionText} - - -
+ where: { + id: params.courseId, + }, + }); + if (!course) { + return redirect("/"); + } + + const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId]; + const totalFields = requiredFields.length; + const completedFields = requiredFields.filter(Boolean).length; + const completionText = `(${completedFields}/${totalFields})`; + return ( +
+
+
+

Course Setup

+ + Completed fields {completionText}
-
-
-
- -

- Costomize your course -

-
- - - -
- +
+
+
+
+ +

Costomize your course

+
+
- +
); }; -export default CourseIdPagePage; \ No newline at end of file +export default CourseIdPagePage; From 75593921bf703fc34a00145b22d35d81ae0f7a12 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 13:03:19 +0600 Subject: [PATCH 120/706] just write the lorum ipusm text 10 --- .../teacher/courses/[courseId]/components/title_form.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 38b020e..6f9c855 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -53,6 +53,7 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { Edit Title )} + Lorem ipsum dolor sit amet consectetur adipisicing elit. Minima, temporibus. {isEditing && ( From 4e8b8a5d393c16476b7baab5743eafd1b4a25715 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 15:37:09 +0600 Subject: [PATCH 121/706] fixed --- .../teacher/courses/[courseId]/components/title_form.tsx | 1 - src/app/api/courses/[courseId]/route.ts | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx index 6f9c855..38b020e 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx @@ -53,7 +53,6 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { Edit Title )} - Lorem ipsum dolor sit amet consectetur adipisicing elit. Minima, temporibus. {isEditing && ( diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 13c637a..39066e5 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -6,13 +6,13 @@ export async function PATCH(req: Request, { params }: { params: { courseId: stri try { const { userId } = await auth(); const { courseId } = params; - const values = await req.json(); - + const values = aw if (!userId) { return new NextResponse("Unauthorized", { status: 401 }); } - const course = await db.course.update({ + const course = await db.ait req.json(); +course.update({ where: { id: courseId, userId, From 40efb1168087cf3a789d072f401b80fd7eff37cf Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 15:42:04 +0600 Subject: [PATCH 122/706] fixed --- .../teacher/courses/[courseId]/page.tsx | 35 +++++++------- src/app/api/courses/[courseId]/route.ts | 47 ++++++++++--------- 2 files changed, 44 insertions(+), 38 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 35b2e88..0e9b137 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -6,43 +6,46 @@ import { LayoutDashboard, LayoutDashboardIcon } from "lucide-react"; import { TitleForm } from "./components/title_form"; const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => { + const { userId } = await auth(); if (!userId) { return redirect("/"); } - const course = await db.course.findUnique({ +Z const course = await db.course.findUnique({ where: { - id: params.courseId, + id: params.courseId, // Используем курс из params }, }); + if (!course) { return redirect("/"); } + // Проверяем обязательные поля const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId]; const totalFields = requiredFields.length; const completedFields = requiredFields.filter(Boolean).length; const completionText = `(${completedFields}/${totalFields})`; - return ( -
-
-
-

Course Setup

- Completed fields {completionText} + return ( +
+
+
+

Course Setup

+ Completed fields {completionText} +
-
-
-
-
- -

Costomize your course

+
+
+
+ +

Customize your course

+
+
-
-
); }; diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts index 39066e5..bee4f99 100644 --- a/src/app/api/courses/[courseId]/route.ts +++ b/src/app/api/courses/[courseId]/route.ts @@ -3,28 +3,31 @@ import { auth } from "@clerk/nextjs/server"; import { NextResponse } from "next/server"; export async function PATCH(req: Request, { params }: { params: { courseId: string } }) { - try { - const { userId } = await auth(); - const { courseId } = params; - const values = aw - if (!userId) { - return new NextResponse("Unauthorized", { status: 401 }); - } + try { + const { userId } = await auth(); + const { courseId } = params; + + if (!userId) { + return new NextResponse("Unauthorized", { status: 401 }); + } - const course = await db.ait req.json(); -course.update({ - where: { - id: courseId, - userId, - }, - data: { - ...values, - }, - }); + // Parse the request body to get the updated course data + const values = await req.json(); - return NextResponse.json(course); - } catch (error) { - console.log("[COURSE_ID]", error); - return new NextResponse("Internal server error", { status: 500 }); - } + // Update the course in the database + const course = await db.course.update({ + where: { + id: courseId, + userId, // Ensure the course is associated with the authenticated user + }, + data: { + ...values, // Update with the new values passed from the request + }, + }); + + return NextResponse.json(course); // Return the updated course data + } catch (error) { + console.log("[COURSE_ID]", error); + return new NextResponse("Internal server error", { status: 500 }); + } } From 85872a4979eee62fd04c5351c72c781272411d38 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 16:46:13 +0600 Subject: [PATCH 123/706] fixed --- .../{title_form.tsx => TitleForm.tsx} | 0 .../teacher/courses/[courseId]/page.tsx | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) rename src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/{title_form.tsx => TitleForm.tsx} (100%) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx similarity index 100% rename from src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/title_form.tsx rename to src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 0e9b137..92fbbbb 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -3,7 +3,7 @@ import { auth } from "@clerk/nextjs/server"; import { redirect } from "next/navigation"; import { IconBadge } from "@/components/icon-badge"; import { LayoutDashboard, LayoutDashboardIcon } from "lucide-react"; -import { TitleForm } from "./components/title_form"; +import { TitleForm } from "./components/TitleForm"; const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => { @@ -12,9 +12,9 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => return redirect("/"); } -Z const course = await db.course.findUnique({ + const course = await db.course.findUnique({ where: { - id: params.courseId, // Используем курс из params + id: params.courseId, }, }); @@ -22,7 +22,7 @@ Z const course = await db.course.findUnique({ return redirect("/"); } - // Проверяем обязательные поля + const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId]; const totalFields = requiredFields.length; const completedFields = requiredFields.filter(Boolean).length; @@ -42,7 +42,14 @@ Z const course = await db.course.findUnique({

Customize your course

- + +
From f0395c22f97db50a8383aa16a80f825948e9cd80 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 16:48:54 +0600 Subject: [PATCH 124/706] fixed --- .../teacher/courses/[courseId]/components/TitleForm.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx index 38b020e..91aa28a 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx @@ -6,7 +6,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import axios from "axios"; import { Pencil } from "lucide-react"; import { Button } from "@/components/ui/button"; -import { Form, FormControl, FormField, FormItem } from "@/components/ui/form"; +import {Form, FormControl, FormField, FormItem, FormMessage} from "@/components/ui/form"; import { Input } from "@/components/ui/input"; const formSchema = z.object({ @@ -66,12 +66,17 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { + )} /> - + +
)} From 9bd5b5862a5e997338011af5de3dc4372d380e2f Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 16:52:25 +0600 Subject: [PATCH 125/706] set to value --- .../courses/[courseId]/components/TitleForm.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx index 91aa28a..170dfc4 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx @@ -32,12 +32,13 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { const toggleEdit = () => setIsEditing((current) => !current); const onSubmit = async (values: z.infer) => { - try { - await axios.patch(`/api/courses/${courseId}/edit`, values); - toggleEdit(); - } catch (error) { - console.error("Ошибка при обновлении курса:", error); - } + // try { + // await axios.patch(`/api/courses/${courseId}/edit`, values); + // toggleEdit(); + // } catch (error) { + // console.error("Ошибка при обновлении курса:", error); + // } + // console.log(values); console.log(values); }; From 466db99f594defaec0c23495849eba0942d567cb Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 17:09:25 +0600 Subject: [PATCH 126/706] title form excepted --- .../[courseId]/components/TitleForm.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx index 170dfc4..107db11 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx @@ -8,6 +8,8 @@ import { Pencil } from "lucide-react"; import { Button } from "@/components/ui/button"; import {Form, FormControl, FormField, FormItem, FormMessage} from "@/components/ui/form"; import { Input } from "@/components/ui/input"; +import toast from "react-hot-toast"; +import {router} from "next/client"; const formSchema = z.object({ title: z.string().min(1, "Title is required"), @@ -32,14 +34,14 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { const toggleEdit = () => setIsEditing((current) => !current); const onSubmit = async (values: z.infer) => { - // try { - // await axios.patch(`/api/courses/${courseId}/edit`, values); - // toggleEdit(); - // } catch (error) { - // console.error("Ошибка при обновлении курса:", error); - // } - // console.log(values); - console.log(values); + try { + await axios.patch(`/api/courses/${courseId}`, values); + toast.success("Course updated!"); + toggleEdit(); + router.refresh() + } catch (error) { + console.error("Ошибка при обновлении курса:", error); + } }; return ( From b26ca6703824b96d0245cfdbae2cd7cc4a1a03c4 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 17:11:33 +0600 Subject: [PATCH 127/706] toast like en error but scucessfull --- .../[courseId]/components/TitleForm.tsx | 82 +++++++++---------- 1 file changed, 39 insertions(+), 43 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx index 107db11..5cf70b6 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx @@ -6,10 +6,10 @@ import { zodResolver } from "@hookform/resolvers/zod"; import axios from "axios"; import { Pencil } from "lucide-react"; import { Button } from "@/components/ui/button"; -import {Form, FormControl, FormField, FormItem, FormMessage} from "@/components/ui/form"; +import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import toast from "react-hot-toast"; -import {router} from "next/client"; +import { useRouter } from "next/navigation"; // ✅ Правильный импорт const formSchema = z.object({ title: z.string().min(1, "Title is required"), @@ -24,13 +24,16 @@ interface TitleFormProps { export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { const [isEditing, setIsEditing] = useState(false); + const router = useRouter(); // ✅ Используем useRouter() const form = useForm>({ resolver: zodResolver(formSchema), - defaultValues: initialData, + defaultValues: { + title: initialData?.title ?? "", // ✅ Защита от undefined + }, }); - const { isSubmitting, isValid } = form.formState; + const { isSubmitting, isDirty } = form.formState; // ✅ isDirty вместо isValid const toggleEdit = () => setIsEditing((current) => !current); const onSubmit = async (values: z.infer) => { @@ -38,51 +41,44 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { await axios.patch(`/api/courses/${courseId}`, values); toast.success("Course updated!"); toggleEdit(); - router.refresh() + router.refresh(); // ✅ Теперь работает } catch (error) { console.error("Ошибка при обновлении курса:", error); } }; return ( -
-
Course Title
- - - {isEditing && ( -
- - ( - - - - - - - )} - /> -
+
+
+ Course Title + +
- - -
- - - )} -
+ {isEditing && ( +
+ + ( + + + + + + + )} + /> +
+ +
+ + + )} +
); }; From fa488ec10a9ba06e8c4ca5d441a2d474bd715981 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 18:07:56 +0600 Subject: [PATCH 128/706] description form --- .../[courseId]/components/DescriptionForm.tsx | 84 +++++++++++++++++++ .../teacher/courses/[courseId]/page.tsx | 6 ++ 2 files changed, 90 insertions(+) create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx new file mode 100644 index 0000000..9a51a25 --- /dev/null +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx @@ -0,0 +1,84 @@ +"use client"; +import React, { useState } from "react"; +import * as z from "zod"; +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import axios from "axios"; +import { Pencil } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form"; +import { Input } from "@/components/ui/input"; +import toast from "react-hot-toast"; +import { useRouter } from "next/navigation"; + +const formSchema = z.object({ + title: z.string().min(1, "Title is required"), +}); + +interface TitleFormProps { + initialData: { + title: string; + }; + courseId: string; +} + +export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { + const [isEditing, setIsEditing] = useState(false); + const router = useRouter(); // ✅ Используем useRouter() + + const form = useForm>({ + resolver: zodResolver(formSchema), + defaultValues: { + title: initialData?.title ?? "", // ✅ Защита от undefined + }, + }); + + const { isSubmitting, isDirty } = form.formState; // ✅ isDirty вместо isValid + const toggleEdit = () => setIsEditing((current) => !current); + + const onSubmit = async (values: z.infer) => { + try { + await axios.patch(`/api/courses/${courseId}`, values); + toast.success("Course updated!"); + toggleEdit(); + router.refresh(); // ✅ Теперь работает + } catch (error) { + console.error("Ошибка при обновлении курса:", error); + } + }; + + return ( +
+
+ Course Title + +
+ + {isEditing && ( +
+ + ( + + + + + + + )} + /> +
+ +
+ + + )} +
+ ); +}; diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 92fbbbb..42194c3 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -48,6 +48,12 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => title: course.title ?? "" }} courseId={course.id} + />
From b30232a3efb3e579050ffa98fb2052e97589d5c1 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 18:08:41 +0600 Subject: [PATCH 129/706] description form --- .../courses/[courseId]/components/DescriptionForm.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx index 9a51a25..a0c6d85 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx @@ -12,17 +12,17 @@ import toast from "react-hot-toast"; import { useRouter } from "next/navigation"; const formSchema = z.object({ - title: z.string().min(1, "Title is required"), + title: z.string().min(1, "Description is required"), }); -interface TitleFormProps { +interface DescriptionFormProps { initialData: { title: string; }; courseId: string; } -export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { +export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => { const [isEditing, setIsEditing] = useState(false); const router = useRouter(); // ✅ Используем useRouter() @@ -50,9 +50,9 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => { return (
- Course Title + Course Description
From d982a02d7dda78485099db2f5e39af6defcb0eb6 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 18:21:00 +0600 Subject: [PATCH 130/706] description form --- .../courses/[courseId]/components/DescriptionForm.tsx | 11 +++++++---- .../(routes)/teacher/courses/[courseId]/page.tsx | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx index a0c6d85..0741eb9 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx @@ -12,7 +12,7 @@ import toast from "react-hot-toast"; import { useRouter } from "next/navigation"; const formSchema = z.object({ - title: z.string().min(1, "Description is required"), + title: z.string().min(1, "Description is required"), }); interface DescriptionFormProps { @@ -29,11 +29,11 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { - title: initialData?.title ?? "", // ✅ Защита от undefined + title: initialData?.title ?? "" }, }); - const { isSubmitting, isDirty } = form.formState; // ✅ isDirty вместо isValid + const { isSubmitting, isDirty } = form.formState; const toggleEdit = () => setIsEditing((current) => !current); const onSubmit = async (values: z.infer) => { @@ -56,12 +56,13 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
+ {isEditing && (
( @@ -82,3 +83,5 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
); }; + + diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 42194c3..26742c9 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -4,6 +4,9 @@ import { redirect } from "next/navigation"; import { IconBadge } from "@/components/icon-badge"; import { LayoutDashboard, LayoutDashboardIcon } from "lucide-react"; import { TitleForm } from "./components/TitleForm"; +import { + DescriptionForm +} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm"; const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => { From fffc9a7f4d2304ae5e5a8b60fcf148cd0dd43abc Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 18:42:24 +0600 Subject: [PATCH 131/706] description form --- .../[courseId]/components/DescriptionForm.tsx | 19 +++- .../[courseId]/components/TitleForm.tsx | 8 ++ .../teacher/courses/[courseId]/page.tsx | 106 +++++++++--------- 3 files changed, 72 insertions(+), 61 deletions(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx index 0741eb9..15481e2 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx @@ -12,12 +12,12 @@ import toast from "react-hot-toast"; import { useRouter } from "next/navigation"; const formSchema = z.object({ - title: z.string().min(1, "Description is required"), + description: z.string().min(1, "Description is required"), }); interface DescriptionFormProps { initialData: { - title: string; + description: string; }; courseId: string; } @@ -29,7 +29,7 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { - title: initialData?.title ?? "" + description: initialData?.description ?? "" }, }); @@ -56,17 +56,26 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
+ { + !isEditing && ( +

+ {initialData.description} +

+ ) + + } + {isEditing && ( ( - + diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx index 5cf70b6..7a892cc 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/TitleForm.tsx @@ -56,6 +56,14 @@ export const TitleForm = ({ initialData, courseId }: TitleFormProps) => {
+ { + !isEditing && ( +

+ {initialData.title} +

+ ) + + } {isEditing && ( diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx index 26742c9..c0ac025 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx @@ -2,67 +2,61 @@ import { db } from "@/lib/db"; import { auth } from "@clerk/nextjs/server"; import { redirect } from "next/navigation"; import { IconBadge } from "@/components/icon-badge"; -import { LayoutDashboard, LayoutDashboardIcon } from "lucide-react"; +import { LayoutDashboard } from "lucide-react"; import { TitleForm } from "./components/TitleForm"; -import { - DescriptionForm -} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm"; +import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm"; const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => { - - const { userId } = await auth(); - if (!userId) { - return redirect("/"); - } - - const course = await db.course.findUnique({ - where: { - id: params.courseId, - }, - }); - - if (!course) { - return redirect("/"); - } - - - const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId]; - const totalFields = requiredFields.length; - const completedFields = requiredFields.filter(Boolean).length; - const completionText = `(${completedFields}/${totalFields})`; - - return ( -
-
-
-

Course Setup

- Completed fields {completionText} -
-
-
-
-
- -

Customize your course

+ const { userId } = await auth(); + if (!userId) { + return redirect("/"); + } + + const course = await db.course.findUnique({ + where: { + id: params.courseId, + }, + }); + + if (!course) { + return redirect("/"); + } + + const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId]; + const totalFields = requiredFields.length; + const completedFields = requiredFields.filter(Boolean).length; + const completionText = `(${completedFields}/${totalFields})`; + + return ( +
+
+
+

Course Setup

+ Completed fields {completionText} +
+
+
+
+
+ +

Customize your course

+
+ + +
- - -
-
- ); + ); }; export default CourseIdPagePage; From 87cabb5e59f0456541972a197874e04071ce03f5 Mon Sep 17 00:00:00 2001 From: yntymakdev Date: Fri, 7 Feb 2025 18:51:07 +0600 Subject: [PATCH 132/706] description form --- .../teacher/courses/[courseId]/components/DescriptionForm.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx index 15481e2..e189463 100644 --- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx +++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm.tsx @@ -10,6 +10,7 @@ import { Form, FormControl, FormField, FormItem, FormMessage } from "@/component import { Input } from "@/components/ui/input"; import toast from "react-hot-toast"; import { useRouter } from "next/navigation"; +import {Textarea} from "@/components/ui/textarea"; const formSchema = z.object({ description: z.string().min(1, "Description is required"), @@ -57,6 +58,7 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
{ + !isEditing && (

{initialData.description} @@ -75,7 +77,7 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) render={({ field }) => ( - +