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 (
+
+ );
+ }
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 (
-
);
}
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 (
-
- );
-};
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 (
+
+
+
+
+ );
+};
+
+
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 (
+
);
};
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 (
-
+
+ {label}
From e9d21d46f33dd23c039b3212232f931a67a33a73 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 4 Feb 2025 22:24:03 +0600
Subject: [PATCH 014/706] adding some style
---
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 e0f6f43..24a0660 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 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 ? (
+
+
+ Exit
+
+
+ )
+
+ }
+
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
-
- )
-
- }
-
+ ) :(
+
+
+ Teach Mode
+
+
+ )}
-
-
);
};
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 ? (
-
+
Exit
) :(
-
+
Teach Mode
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 ? (
+
+
Exit
+
) :(
From fb73b3bfbf63a7a7e4ac159bfbf30e913f78a0f5 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 5 Feb 2025 02:38:26 +0600
Subject: [PATCH 039/706] sidebar for teach mode
---
.../(dashboard)/components/SideBarRoutes.tsx | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
index 988d9db..f0ea99e 100644
--- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
+++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
@@ -25,6 +25,18 @@ const guestRoutes = [
label: 'What',
href: '/what',
},
+],
+ const teacherRoutes = [
+ {
+ icon: Layout,
+ label: 'Courses',
+ href: '/teacher/courses',
+ } ,
+ {
+ icon: Compass,
+ label: 'Analitycs',
+ href: '/teacher/analitycs',
+ },
]
export default function SideBarRoutes () {
From 8c7ba7931a52fdb11ba0466bcf9d0d0c7a7889e0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 5 Feb 2025 02:42:07 +0600
Subject: [PATCH 040/706] customize /teach-modeDashBoard/
---
.../(dashboard)/components/SideBarRoutes.tsx | 62 ++++++++++---------
1 file changed, 33 insertions(+), 29 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
index f0ea99e..cc70413 100644
--- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
+++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
@@ -1,60 +1,64 @@
'use client'
-import {Compass, Layout} from "lucide-react";
+import { Compass, Layout } from "lucide-react";
import SideBarItem from "@/app/(platform)/(dashboard)/components/SideBarItem";
+import { usePathname } from "next/navigation";
const guestRoutes = [
{
icon: Layout,
label: 'Dashboard',
href: '/',
- } ,
+ },
{
icon: Compass,
label: 'Browse',
href: '/search',
- }, {
+ },
+ {
icon: Compass,
label: 'Settings',
href: '/settings',
- }, {
+ },
+ {
icon: Compass,
label: 'Think',
href: '/think',
- }, {
+ },
+ {
icon: Compass,
label: 'What',
href: '/what',
},
-],
- const teacherRoutes = [
+];
+
+const teacherRoutes = [
{
- icon: Layout,
+ icon: List,
label: 'Courses',
href: '/teacher/courses',
- } ,
+ },
{
- icon: Compass,
+ icon: BarChart,
label: 'Analitycs',
href: '/teacher/analitycs',
},
-]
-
-export default function SideBarRoutes () {
- const routes = guestRoutes;
-
- return (
-
- {routes.map((route) => (
-
-
- ))}
-
- );
-};
+];
+export default function SideBarRoutes() {
+ const pathname = usePathname();
+ const isTeacherPage = pathname.startsWith("/teacher"); // Предположим, что это определяет, является ли текущая страница страницей учителя
+ const routes = isTeacherPage ? teacherRoutes : guestRoutes;
+ return (
+
+ {routes.map((route) => (
+
+ ))}
+
+ );
+}
From f4922cc22bdf482f612c4f0ac6eb3c2ef4e828d9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 5 Feb 2025 02:46:43 +0600
Subject: [PATCH 041/706] analytics page (tech mode)
---
.../(dashboard)/(routes)/teacher/analytics/page.tsx | 11 +++++++++++
.../(dashboard)/components/SideBarRoutes.tsx | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/analytics/page.tsx
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/analytics/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/analytics/page.tsx
new file mode 100644
index 0000000..0a8cf71
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/analytics/page.tsx
@@ -0,0 +1,11 @@
+'use client'
+export default function AnalyticsPage () {
+ return (
+
+ AnalyticsPage
+
+
+ );
+};
+
+
diff --git a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
index cc70413..a878e20 100644
--- a/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
+++ b/src/app/(platform)/(dashboard)/components/SideBarRoutes.tsx
@@ -1,5 +1,5 @@
'use client'
-import { Compass, Layout } from "lucide-react";
+import {BarChart, Compass, Layout, List} from "lucide-react";
import SideBarItem from "@/app/(platform)/(dashboard)/components/SideBarItem";
import { usePathname } from "next/navigation";
From 31275d0f8c3791dcaddcd9d579dd67a9253c5449 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 5 Feb 2025 02:48:54 +0600
Subject: [PATCH 042/706] finished in this day - 2 challange in 30 days
---
src/app/(platform)/(dashboard)/layout.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/layout.tsx b/src/app/(platform)/(dashboard)/layout.tsx
index 042c943..20de09d 100644
--- a/src/app/(platform)/(dashboard)/layout.tsx
+++ b/src/app/(platform)/(dashboard)/layout.tsx
@@ -13,7 +13,7 @@ export default function DashBoardLayout({ children }: { children: ReactNode }) {
-
+
{children}
From ce3e9a2c8e6aeb05531fd144bfebbf8227ae9482 Mon Sep 17 00:00:00 2001
From: YNTY <144984605+yntymakdev@users.noreply.github.com>
Date: Wed, 5 Feb 2025 02:49:53 +0600
Subject: [PATCH 043/706] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 90a2ee4..aa2bc6b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# It - Course Project
+# IT - Course Project
This project is a functional platform focused on providing high-quality and free IT courses, as well as other educational content. It is part of the **Challenge 30github** initiative.
From 1c35ef6b4d7c6e786f92f60a4c674105b63247fc Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 5 Feb 2025 03:07:50 +0600
Subject: [PATCH 044/706] ok, created new coursePage on tech mode also btn
---
.../(dashboard)/(routes)/teacher/courses/page.tsx | 13 ++++++++++++-
.../(dashboard)/components/SideBarRoutes.tsx | 4 ++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/page.tsx
index 602fd68..bb53c2b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/page.tsx
@@ -1,7 +1,18 @@
'use client'
+import Link from "next/link";
+import {Button} from "@/components/ui/button";
+
export default function CoursesPage () {
return (
-
+
+
+
+ New Course
+
+
+
+
+
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
-
-
- );
-};
-
+
+ );
+}
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!
+
+
-
+
(
+
+
+
+ Course title
+
+
+
+
+ )}>
+
{errors.title.message}}
Submit
-
+
);
}
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}
}
-
- Submit
);
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
+ )}>
+
+
+
+ Cancel
+
+
+
+
+
+
- )}>
+
+
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
-
-
-
- )}>
-
-
-
- Cancel
-
-
-
-
-
-
-
-
-
-
-
-
- );
+ 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!
+
+
+
+
+
+ );
}
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!
-
-
-
-
-
- );
+ 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
+
+
+ )}>
+
+
+
+ Cancel
+
+
+
+ Continue
+
+
+
+
+
+
+ );
}
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 (
+
+ )
+})
+FormLabel.displayName = "FormLabel"
+
+const FormControl = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ ...props }, ref) => {
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
+
+ return (
+
+ )
+})
+FormControl.displayName = "FormControl"
+
+const FormDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes
+>(({ className, ...props }, ref) => {
+ const { formDescriptionId } = useFormField()
+
+ return (
+
+ )
+})
+FormDescription.displayName = "FormDescription"
+
+const FormMessage = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes
+>(({ className, children, ...props }, ref) => {
+ const { error, formMessageId } = useFormField()
+ const body = error ? String(error?.message) : children
+
+ if (!body) {
+ return null
+ }
+
+ return (
+
+ {body}
+
+ )
+})
+FormMessage.displayName = "FormMessage"
+
+export {
+ useFormField,
+ Form,
+ FormItem,
+ FormLabel,
+ FormControl,
+ FormDescription,
+ FormMessage,
+ FormField,
+}
diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx
new file mode 100644
index 0000000..5341821
--- /dev/null
+++ b/src/components/ui/label.tsx
@@ -0,0 +1,26 @@
+"use client"
+
+import * as React from "react"
+import * as LabelPrimitive from "@radix-ui/react-label"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const labelVariants = cva(
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
+)
+
+const Label = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef &
+ VariantProps
+>(({ className, ...props }, ref) => (
+
+))
+Label.displayName = LabelPrimitive.Root.displayName
+
+export { Label }
From 2be04d6f4d543987cfaad76d157845223bd8730e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 5 Feb 2025 13:23:26 +0600
Subject: [PATCH 055/706] as
---
.../(routes)/teacher/create/page.tsx | 131 +++++++++---------
1 file changed, 63 insertions(+), 68 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx
index f1c555f..8fa3e8c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx
@@ -1,78 +1,73 @@
'use client';
import { z } from 'zod';
-import {Form, useForm} from 'react-hook-form';
+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} from "@/components/ui/form";
-import {Input} from "@/components/ui/input";
-
+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';
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
-
-
- )}>
-
-
-
- Cancel
-
-
-
- Continue
-
-
-
-
-
-
- );
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ title: ''
+ }
+ });
+
+ const {isValid, isSubmitting } = 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!
+
+
+
+
+
+
+
+ );
}
From c5d3c30fe5350d2cfc5e8bf040f36ccad91c169d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 5 Feb 2025 13:25:43 +0600
Subject: [PATCH 056/706] just fixing some style
---
.../(dashboard)/(routes)/teacher/create/page.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx
index 8fa3e8c..7fdd15c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/create/page.tsx
@@ -29,12 +29,12 @@ export default function CreatePage() {
return (
-
Create Page
+
Name your course
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias amet atque dignissimos est itaque neque, odit quis tempore ullam voluptate!
+ What would you like to name yout course?Dont worry you can change later
-
+
-
+
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
-
-
-
+
)}
/>
@@ -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() {
Continue
-
-
-
-
+
+
);
-}
+};
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.
-
-
-
-
);
-};
+}
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
-
+
+
- TitleForm
+
);
};
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
+
+ {isEditting && (
+ <>Cancel >
+
+ )}{
+ isEditting && (
+ <>
+
+ )
+
+ }
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
-
-
-
- {isEditting && (
- <>Cancel >
-
- )}{
- isEditting && (
- <>
-
- >
- )
-
- }
-
-
-
-
-
-
+
+
Course Title
+
+ {isEditing ? (
+ <>
+ Cancel
+ >
+ ) : (
+
+ )}
+
+ {isEditing && (
+
+
+
+ Save
+
+
+ )}
-
-
);
};
-
-
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 ? (
- <>
- Cancel
- >
- ) : (
-
- )}
+ {isEditing ?(
+
+ <>Cancel>
+ ):(
+<>
+
+
+ Edit 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 ?(
-
- <>Cancel>
- ):(
-<>
-
+ {isEditing ? (
+ <>Cancel>
+ ) : (
+ <>
Edit Title
- }
->
- )}
+ >
+ )}
{isEditing && (
-
+
+
+ (
+
+
+
+
+ ) }>
+
Save
-
+
)}
);
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) => {
(
-
-
+
+
+
- ) }>
-
-
-
- Save
+ )}
+
+
)}
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 && (
-
- (
+
+ (
-
-
-
+
+
+
- )}
-
-
-
+ )}
+ />
+
+ Save
+
+
)}
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) => {
+
)}
/>
-
+
+
+
Save
+
+
)}
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 ? (
- <>Cancel>
- ) : (
- <>
-
- Edit Title
- >
- )}
-
-
- {isEditing && (
-
-
- (
-
-
-
-
-
-
- )}
- />
-
+
+
+ Course Title
+
+ {isEditing ? <>Cancel> : <> Edit Title>}
+
+
-
- Save
-
-
-
-
-
- )}
-
+ {isEditing && (
+
+
+ (
+
+
+
+
+
+
+ )}
+ />
+
+
+ Save
+
+
+
+
+ )}
+
);
};
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 ? <>Cancel> : <> Edit Title>}
+
+
+
+ {isEditing && (
+
+
+ (
+
+
+
+
+
+
+ )}
+ />
+
+
+ Save
+
+
+
+
+ )}
+
+ );
+};
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
- {isEditing ? <>Cancel> : <> Edit Title>}
+ {isEditing ? <>Cancel> : <> Edit 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 }) => (
-
+
From 051cb4309418c670c706cdca29a590342b18c3d8 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 7 Feb 2025 19:06:24 +0600
Subject: [PATCH 133/706] description form
---
.../[courseId]/components/DescriptionForm.tsx | 25 ++++++++-----------
1 file changed, 11 insertions(+), 14 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 e189463..c1a2c75 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,10 +10,11 @@ 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";
+import { Textarea } from "@/components/ui/textarea";
+import { cn } from "@/lib/utils";
const formSchema = z.object({
- description: z.string().min(1, "Description is required"),
+ description: z.string().min(1, "Description is required"),
});
interface DescriptionFormProps {
@@ -58,26 +59,24 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
{
-
!isEditing && (
-
- {initialData.description}
+
+ {initialData.description || 'No description'}
- )
-
- }
-
-
+ )}
{isEditing && (
(
-
+
@@ -94,5 +93,3 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
);
};
-
-
From d7dd923bd67c9e49fef59f36898c6c8b99cf5857 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 7 Feb 2025 19:10:57 +0600
Subject: [PATCH 134/706] as
---
src/components/ui/textarea.tsx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 src/components/ui/textarea.tsx
diff --git a/src/components/ui/textarea.tsx b/src/components/ui/textarea.tsx
new file mode 100644
index 0000000..4d858bb
--- /dev/null
+++ b/src/components/ui/textarea.tsx
@@ -0,0 +1,22 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+const Textarea = React.forwardRef<
+ HTMLTextAreaElement,
+ React.ComponentProps<"textarea">
+>(({ className, ...props }, ref) => {
+ return (
+
+ )
+})
+Textarea.displayName = "Textarea"
+
+export { Textarea }
From 3969515fbd943d89f2d4faccbf75062868b89a2f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 7 Feb 2025 20:42:00 +0600
Subject: [PATCH 135/706] as
---
package-lock.json | 247 ++++++++++++++++++++++++++++++++
package.json | 3 +
src/app/api/uploadthing/core.ts | 31 ++++
3 files changed, 281 insertions(+)
create mode 100644 src/app/api/uploadthing/core.ts
diff --git a/package-lock.json b/package-lock.json
index f0ccd2d..f3aecc4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,6 +15,7 @@
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-visually-hidden": "^1.1.1",
+ "@uploadthing/react": "^7.1.5",
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
@@ -23,10 +24,12 @@
"next": "15.1.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
+ "react-dropzone": "^14.3.5",
"react-hook-form": "^7.54.2",
"react-hot-toast": "^2.5.1",
"tailwind-merge": "^3.0.1",
"tailwindcss-animate": "^1.0.7",
+ "uploadthing": "^7.4.4",
"zod": "^3.24.1"
},
"devDependencies": {
@@ -174,6 +177,19 @@
"integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==",
"license": "MIT"
},
+ "node_modules/@effect/platform": {
+ "version": "0.70.7",
+ "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.70.7.tgz",
+ "integrity": "sha512-TbNwj/mOJhycPygbmicGBS7CNtv5Z8WVheRbLUdP3oPAe/nbSOJVLc8ZPvOejhquF/1vJMKuqY5MWfkcBpvi/g==",
+ "license": "MIT",
+ "dependencies": {
+ "find-my-way-ts": "^0.1.5",
+ "multipasta": "^0.2.5"
+ },
+ "peerDependencies": {
+ "effect": "^3.11.5"
+ }
+ },
"node_modules/@emnapi/runtime": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz",
@@ -1228,6 +1244,12 @@
}
}
},
+ "node_modules/@standard-schema/spec": {
+ "version": "1.0.0-beta.3",
+ "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0-beta.3.tgz",
+ "integrity": "sha512-0ifF3BjA1E8SY9C+nUew8RefNOIq0cDlYALPty4rhUm8Rrl6tCM8hBT4bhGhx7I7iXD0uAgt50lgo8dD73ACMw==",
+ "license": "MIT"
+ },
"node_modules/@swc/counter": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
@@ -1273,6 +1295,43 @@
"@types/react": "^19.0.0"
}
},
+ "node_modules/@uploadthing/mime-types": {
+ "version": "0.3.4",
+ "resolved": "https://registry.npmjs.org/@uploadthing/mime-types/-/mime-types-0.3.4.tgz",
+ "integrity": "sha512-EB0o0a4y++UJFMLqS8LDVhSQgXUllG6t5fwl5cbmOM0Uay8YY5Nc/JjFwzJ8wccdIKz4oYwQW7EOSfUyaMPbfw==",
+ "license": "MIT"
+ },
+ "node_modules/@uploadthing/react": {
+ "version": "7.1.5",
+ "resolved": "https://registry.npmjs.org/@uploadthing/react/-/react-7.1.5.tgz",
+ "integrity": "sha512-D0lP4YnUWw5LFHrLuL+sq26wlul9dGE70G+oOQ+qkM1ZqSeKSGvIdAIOAQUBj2qQi4Re7o0VpF3+3qBF3svN6A==",
+ "license": "MIT",
+ "dependencies": {
+ "@uploadthing/shared": "7.1.5",
+ "file-selector": "0.6.0"
+ },
+ "peerDependencies": {
+ "next": "*",
+ "react": "^17.0.2 || ^18.0.0 || ^19.0.0",
+ "uploadthing": "^7.2.0"
+ },
+ "peerDependenciesMeta": {
+ "next": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@uploadthing/shared": {
+ "version": "7.1.5",
+ "resolved": "https://registry.npmjs.org/@uploadthing/shared/-/shared-7.1.5.tgz",
+ "integrity": "sha512-5ePSiR2CPA5a8gfPqsHpE/uPwGG9iPqhxcFpeLGnEuExPqIi5ZY7upZgpc+6T1gMxwfbP0O5X4043TTNk3q/pA==",
+ "license": "MIT",
+ "dependencies": {
+ "@uploadthing/mime-types": "0.3.4",
+ "effect": "3.11.5",
+ "sqids": "^0.3.0"
+ }
+ },
"node_modules/ansi-regex": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
@@ -1340,6 +1399,15 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
+ "node_modules/attr-accept": {
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.5.tgz",
+ "integrity": "sha512-0bDNnY/u6pPwHDMoF0FieU354oBi0a8rD9FcsLwzcGWbc8KS8KPIi7y+s13OlVY+gMWc/9xEMUgNE6Qm8ZllYQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/axios": {
"version": "1.7.9",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz",
@@ -1674,12 +1742,43 @@
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
"license": "MIT"
},
+ "node_modules/effect": {
+ "version": "3.11.5",
+ "resolved": "https://registry.npmjs.org/effect/-/effect-3.11.5.tgz",
+ "integrity": "sha512-oSzaR/S/2A/qDTnDqMWxQUNSjCG2sRLB4NEvTu+l9RqE122MTgKXOWzw0x4MHsdovRTzAihfkpgBj2aLFnH2+w==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-check": "^3.21.0"
+ }
+ },
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
"license": "MIT"
},
+ "node_modules/fast-check": {
+ "version": "3.23.2",
+ "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz",
+ "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/dubzzz"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fast-check"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "pure-rand": "^6.1.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
"node_modules/fast-glob": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
@@ -1717,6 +1816,18 @@
"reusify": "^1.0.4"
}
},
+ "node_modules/file-selector": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz",
+ "integrity": "sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ },
+ "engines": {
+ "node": ">= 12"
+ }
+ },
"node_modules/fill-range": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
@@ -1729,6 +1840,12 @@
"node": ">=8"
}
},
+ "node_modules/find-my-way-ts": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.5.tgz",
+ "integrity": "sha512-4GOTMrpGQVzsCH2ruUn2vmwzV/02zF4q+ybhCIrw/Rkt3L8KWcycdC6aJMctJzwN4fXD4SD5F/4B9Sksh5rE0A==",
+ "license": "MIT"
+ },
"node_modules/follow-redirects": {
"version": "1.15.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
@@ -1993,6 +2110,12 @@
"node": ">=14"
}
},
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "license": "MIT"
+ },
"node_modules/lilconfig": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
@@ -2011,6 +2134,18 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"license": "MIT"
},
+ "node_modules/loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ },
+ "bin": {
+ "loose-envify": "cli.js"
+ }
+ },
"node_modules/lower-case": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
@@ -2114,6 +2249,12 @@
"node": ">=16 || 14 >=14.17"
}
},
+ "node_modules/multipasta": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.5.tgz",
+ "integrity": "sha512-c8eMDb1WwZcE02WVjHoOmUVk7fnKU/RmUcosHACglrWAuPQsEJv+E8430sXj6jNc1jHw0zrS16aCjQh4BcEb4A==",
+ "license": "MIT"
+ },
"node_modules/mz": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
@@ -2506,12 +2647,39 @@
}
}
},
+ "node_modules/prop-types": {
+ "version": "15.8.1",
+ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
+ "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.4.0",
+ "object-assign": "^4.1.1",
+ "react-is": "^16.13.1"
+ }
+ },
"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/pure-rand": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz",
+ "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/dubzzz"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fast-check"
+ }
+ ],
+ "license": "MIT"
+ },
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -2553,6 +2721,35 @@
"react": "^19.0.0"
}
},
+ "node_modules/react-dropzone": {
+ "version": "14.3.5",
+ "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-14.3.5.tgz",
+ "integrity": "sha512-9nDUaEEpqZLOz5v5SUcFA0CjM4vq8YbqO0WRls+EYT7+DvxUdzDPKNCPLqGfj3YL9MsniCLCD4RFA6M95V6KMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "attr-accept": "^2.2.4",
+ "file-selector": "^2.1.0",
+ "prop-types": "^15.8.1"
+ },
+ "engines": {
+ "node": ">= 10.13"
+ },
+ "peerDependencies": {
+ "react": ">= 16.8 || 18.0.0"
+ }
+ },
+ "node_modules/react-dropzone/node_modules/file-selector": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-2.1.2.tgz",
+ "integrity": "sha512-QgXo+mXTe8ljeqUFaX3QVHc5osSItJ/Km+xpocx0aSqWGMSCf6qYs/VnzZgS864Pjn5iceMRFigeAV7AfTlaig==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.7.0"
+ },
+ "engines": {
+ "node": ">= 12"
+ }
+ },
"node_modules/react-hook-form": {
"version": "7.54.2",
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.54.2.tgz",
@@ -2586,6 +2783,12 @@
"react-dom": ">=16"
}
},
+ "node_modules/react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "license": "MIT"
+ },
"node_modules/react-remove-scroll": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz",
@@ -2870,6 +3073,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/sqids": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/sqids/-/sqids-0.3.0.tgz",
+ "integrity": "sha512-lOQK1ucVg+W6n3FhRwwSeUijxe93b51Bfz5PMRMihVf1iVkl82ePQG7V5vwrhzB11v0NtsR25PSZRGiSomJaJw==",
+ "license": "MIT"
+ },
"node_modules/std-env": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz",
@@ -3184,6 +3393,44 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/uploadthing": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/uploadthing/-/uploadthing-7.4.4.tgz",
+ "integrity": "sha512-dgV8LqaKrXSnpDkqzzLbVEmIubMPi8a5bRtIzM+rG5EbZpIZyOG0bByLxdSlkSbK5L6F+HbIGX5eDkLPFNL8dg==",
+ "license": "MIT",
+ "dependencies": {
+ "@effect/platform": "0.70.7",
+ "@standard-schema/spec": "1.0.0-beta.3",
+ "@uploadthing/mime-types": "0.3.4",
+ "@uploadthing/shared": "7.1.5",
+ "effect": "3.11.5"
+ },
+ "engines": {
+ "node": ">=18.13.0"
+ },
+ "peerDependencies": {
+ "express": "*",
+ "h3": "*",
+ "tailwindcss": "^3.0.0 || ^4.0.0-beta.0"
+ },
+ "peerDependenciesMeta": {
+ "express": {
+ "optional": true
+ },
+ "fastify": {
+ "optional": true
+ },
+ "h3": {
+ "optional": true
+ },
+ "next": {
+ "optional": true
+ },
+ "tailwindcss": {
+ "optional": true
+ }
+ }
+ },
"node_modules/use-callback-ref": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz",
diff --git a/package.json b/package.json
index d138d2e..a99a5e3 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-visually-hidden": "^1.1.1",
+ "@uploadthing/react": "^7.1.5",
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
@@ -24,10 +25,12 @@
"next": "15.1.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
+ "react-dropzone": "^14.3.5",
"react-hook-form": "^7.54.2",
"react-hot-toast": "^2.5.1",
"tailwind-merge": "^3.0.1",
"tailwindcss-animate": "^1.0.7",
+ "uploadthing": "^7.4.4",
"zod": "^3.24.1"
},
"devDependencies": {
diff --git a/src/app/api/uploadthing/core.ts b/src/app/api/uploadthing/core.ts
new file mode 100644
index 0000000..df7e2e7
--- /dev/null
+++ b/src/app/api/uploadthing/core.ts
@@ -0,0 +1,31 @@
+import { createUploadthing, type FileRouter } from "uploadthing/next";
+import { UploadThingError } from "uploadthing/server";
+
+const f = createUploadthing();
+
+const auth = (req: Request) => ({ id: "fakeId" });
+
+export const ourFileRouter = {
+ imageUploader: f({
+ image: {
+ maxFileSize: "4MB",
+ maxFileCount: 1,
+ },
+ })
+ .middleware(async ({ req }) => {
+ const user = await auth(req);
+
+ if (!user) throw new UploadThingError("Unauthorized");
+
+ return { userId: user.id };
+ })
+ .onUploadComplete(async ({ metadata, file }) => {
+ console.log("Upload complete for userId:", metadata.userId);
+
+ console.log("file url", file.url);
+
+ return { uploadedBy: metadata.userId };
+ }),
+} satisfies FileRouter;
+
+export type OurFileRouter = typeof ourFileRouter;
From ccaff7ca878fed8f6522fcc10903a662fb51ed91 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 8 Feb 2025 20:20:16 +0600
Subject: [PATCH 136/706] now i am starting
---
src/app/api/uploadthing/route.ts | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 src/app/api/uploadthing/route.ts
diff --git a/src/app/api/uploadthing/route.ts b/src/app/api/uploadthing/route.ts
new file mode 100644
index 0000000..e69de29
From f221c54f9a5174b7e253be84bc74e5b732ed25a3 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 8 Feb 2025 20:33:11 +0600
Subject: [PATCH 137/706] now i am starting
---
src/lib/uploadthing.ts | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 src/lib/uploadthing.ts
diff --git a/src/lib/uploadthing.ts b/src/lib/uploadthing.ts
new file mode 100644
index 0000000..e69de29
From f338ac53ce2f3051c695b2b069c3c5aa5f3fcb21 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 8 Feb 2025 20:38:39 +0600
Subject: [PATCH 138/706] now i am starting
---
src/components/file-upload.tsx | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 src/components/file-upload.tsx
diff --git a/src/components/file-upload.tsx b/src/components/file-upload.tsx
new file mode 100644
index 0000000..e69de29
From b851afa795593718b65e43120ddb17739310b573 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 09:09:31 +0600
Subject: [PATCH 139/706] customize file upload page
---
src/app/api/uploadthing/core.ts | 35 +++++++++++++++-----------------
src/app/api/uploadthing/route.ts | 8 ++++++++
src/components/file-upload.tsx | 25 +++++++++++++++++++++++
src/lib/uploadthing.ts | 9 ++++++++
4 files changed, 58 insertions(+), 19 deletions(-)
diff --git a/src/app/api/uploadthing/core.ts b/src/app/api/uploadthing/core.ts
index df7e2e7..9d32d9c 100644
--- a/src/app/api/uploadthing/core.ts
+++ b/src/app/api/uploadthing/core.ts
@@ -3,29 +3,26 @@ import { UploadThingError } from "uploadthing/server";
const f = createUploadthing();
-const auth = (req: Request) => ({ id: "fakeId" });
+const auth = (req: Request) => ({ userId: "fakeId" });
-export const ourFileRouter = {
- imageUploader: f({
- image: {
- maxFileSize: "4MB",
- maxFileCount: 1,
- },
- })
- .middleware(async ({ req }) => {
- const user = await auth(req);
-
- if (!user) throw new UploadThingError("Unauthorized");
+const handleAuth = (req: Request) => {
+ const { userId } = auth(req);
+ if (!userId) throw new UploadThingError("Unauthorized");
+ return { userId };
+};
- return { userId: user.id };
- })
- .onUploadComplete(async ({ metadata, file }) => {
- console.log("Upload complete for userId:", metadata.userId);
+export const ourFileRouter = {
+ courseImage: f({ image: { maxFileSize: "4MB", maxFileCount: 1 } })
+ .middleware(({ req }) => handleAuth(req))
+ .onUploadComplete(() => {}),
- console.log("file url", file.url);
+ courseAttachment: f(["text", "image", "video", "audio", "pdf"])
+ .middleware(({ req }) => handleAuth(req))
+ .onUploadComplete(() => {}),
- return { uploadedBy: metadata.userId };
- }),
+ chapterVideo: f({ video: { maxFileSize: "2GB", maxFileCount: 1 } }) // Ограничил до 2GB
+ .middleware(({ req }) => handleAuth(req))
+ .onUploadComplete(() => {}),
} satisfies FileRouter;
export type OurFileRouter = typeof ourFileRouter;
diff --git a/src/app/api/uploadthing/route.ts b/src/app/api/uploadthing/route.ts
index e69de29..d1efdd4 100644
--- a/src/app/api/uploadthing/route.ts
+++ b/src/app/api/uploadthing/route.ts
@@ -0,0 +1,8 @@
+import { createRouteHandler } from "uploadthing/next";
+
+import { ourFileRouter } from "./core";
+
+export const { GET, POST } = createRouteHandler({
+ router: ourFileRouter,
+
+});
diff --git a/src/components/file-upload.tsx b/src/components/file-upload.tsx
index e69de29..542ff1a 100644
--- a/src/components/file-upload.tsx
+++ b/src/components/file-upload.tsx
@@ -0,0 +1,25 @@
+'use client'
+import { ourFileRouter } from "@/app/api/uploadthing/core";
+import {UploadDropzone} from "@/lib/uploadthing";
+import toast from "react-hot-toast";
+
+interface FileUpload {
+ onChange: (url: string) => void;
+ endpoint: keyof typeof ourFileRouter;
+}
+
+export const FileUpload = ({
+ onChange, endpoint
+ }: FileUpload) => {
+ return (
+ {
+ onChange(res?.[0].urls);
+ }}
+ onUploadError={(error: Error) => {
+ toast.error(`${error.message}`);
+ }}
+ />
+ );
+};
diff --git a/src/lib/uploadthing.ts b/src/lib/uploadthing.ts
index e69de29..c3b04b5 100644
--- a/src/lib/uploadthing.ts
+++ b/src/lib/uploadthing.ts
@@ -0,0 +1,9 @@
+import {
+ generateUploadButton,
+ generateUploadDropzone,
+} from "@uploadthing/react";
+import {OurFileRouter} from "@/app/api/uploadthing/core";
+
+
+export const UploadButton = generateUploadButton();
+export const UploadDropzone = generateUploadDropzone();
From 914dda943d8e668781ab2df2f8bcee8314b088a8 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 10:10:23 +0600
Subject: [PATCH 140/706] custimize image page
---
.../[courseId]/components/ImageForm.tsx | 98 +++++++++++++++++++
.../teacher/courses/[courseId]/page.tsx | 6 ++
src/components/file-upload.tsx | 2 +-
3 files changed, 105 insertions(+), 1 deletion(-)
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
new file mode 100644
index 0000000..07d2f46
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -0,0 +1,98 @@
+"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";
+import { Textarea } from "@/components/ui/textarea";
+import { cn } from "@/lib/utils";
+import {Course} from "@prisma/client";
+
+const formSchema = z.object({
+ imageUr: z.string().min(1,{
+message: 'Image is required'
+ }),
+});
+
+interface ImageFormProps {
+ initialData: Course
+ description: string;
+ };
+ courseId: string;
+}
+
+export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
+ const [isEditing, setIsEditing] = useState(false);
+ const router = useRouter();
+
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ imageUr: initialData?.description ?? ""
+ },
+ });
+
+ const { isSubmitting, isDirty } = form.formState;
+ 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 Image
+
+ {isEditing ? <>Cancel> : <> Edit Image>}
+
+
+
+ {
+ !isEditing && (
+
+ {initialData.description || 'No Image'}
+
+ )}
+ {isEditing && (
+
+
+ (
+
+
+
+
+
+
+ )}
+ />
+
+
+ Save
+
+
+
+
+ )}
+
+ );
+};
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 c0ac025..ca13916 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -5,6 +5,7 @@ import { IconBadge } from "@/components/icon-badge";
import { LayoutDashboard } from "lucide-react";
import { TitleForm } from "./components/TitleForm";
import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm";
+import {ImageForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => {
const { userId } = await auth();
@@ -52,6 +53,11 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
description: course.description ?? "", // Ensure description is not null
}}
courseId={course.id}
+ />
diff --git a/src/components/file-upload.tsx b/src/components/file-upload.tsx
index 542ff1a..a985a99 100644
--- a/src/components/file-upload.tsx
+++ b/src/components/file-upload.tsx
@@ -15,7 +15,7 @@ export const FileUpload = ({
{
- onChange(res?.[0].urls);
+ onChange(res?.[0].url);
}}
onUploadError={(error: Error) => {
toast.error(`${error.message}`);
From 1390103be28653321ee8cdf137a4b830fc9321e9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 10:13:40 +0600
Subject: [PATCH 141/706] custimize image page
---
.../courses/[courseId]/components/ImageForm.tsx | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index 07d2f46..41bf331 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -57,7 +57,15 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
Course Image
- {isEditing ? <>Cancel> : <> Edit Image>}
+ {isEditing && (
+ <>Cancel>
+ )}{
+ !isEditing && (
+ <> Edit Image>
+ )
+ }
+
+ }
@@ -75,7 +83,7 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
(
From b2d8dfdc00daa99e6454ba9a1772cd26c670ae8c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 10:16:21 +0600
Subject: [PATCH 142/706] custimize image page
---
.../[courseId]/components/ImageForm.tsx | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index 41bf331..a5853f4 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -1,4 +1,4 @@
-"use client";
+`"use client";
import React, { useState } from "react";
import * as z from "zod";
import { useForm } from "react-hook-form";
@@ -60,15 +60,18 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
{isEditing && (
<>Cancel>
)}{
- !isEditing && (
- <> Edit Image>
- )
- }
+ {!isEditing && !initialData?.imageUrl &&(
+ <>
+
+ Add an image
+ >
- }
+ )}
+ !isEditing && initialData?.imageUrl && (
+ <> Edit Image>
+ )}
-
{
!isEditing && (
{
);
};
+`
\ No newline at end of file
From 7bbbef64f128dbe14a815a7b7e78228431234f4b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 10:17:58 +0600
Subject: [PATCH 143/706] fixed some bug
---
.../[courseId]/components/ImageForm.tsx | 57 ++++++++-----------
1 file changed, 24 insertions(+), 33 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index a5853f4..412b739 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -1,40 +1,37 @@
-`"use client";
+"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 { Pencil, PlusCircle } 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";
-import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
-import {Course} from "@prisma/client";
+import { Course } from "@prisma/client";
const formSchema = z.object({
- imageUr: z.string().min(1,{
-message: 'Image is required'
+ imageUrl: z.string().min(1, {
+ message: "Image is required",
}),
});
interface ImageFormProps {
- initialData: Course
- description: string;
- };
+ initialData: Course;
courseId: string;
}
-export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
+export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- imageUr: initialData?.description ?? ""
+ imageUrl: initialData?.imageUrl ?? "",
},
});
@@ -57,40 +54,35 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
Course Image
- {isEditing && (
+ {isEditing ? (
<>Cancel>
- )}{
- {!isEditing && !initialData?.imageUrl &&(
+ ) : !initialData?.imageUrl ? (
<>
-
- Add an image
- >
-
- )}
- !isEditing && initialData?.imageUrl && (
- <> Edit Image>
+
+ Add an image
+ >
+ ) : (
+ <>
+ Edit Image
+ >
)}
- {
- !isEditing && (
-
- {initialData.description || 'No Image'}
-
- )}
+ {!isEditing && (
+
+ {initialData.imageUrl || "No Image"}
+
+ )}
{isEditing && (
(
-
+
@@ -107,4 +99,3 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
);
};
-`
\ No newline at end of file
From f4f89ea0bb382668a0e2ee81667b7b4dc28e486c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 10:42:27 +0600
Subject: [PATCH 144/706] testing
---
.../courses/[courseId]/components/ImageForm.tsx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index 412b739..f97a241 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -4,7 +4,7 @@ import * as z from "zod";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import axios from "axios";
-import { Pencil, PlusCircle } from "lucide-react";
+import {ImageIcon, Pencil, PlusCircle} 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";
@@ -69,9 +69,16 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
{!isEditing && (
-
- {initialData.imageUrl || "No Image"}
-
+ !initialData.imageUrl ? (
+
+
+
+ ) : (
+
+ current image
+
+ )
)}
{isEditing && (
From ac5f1059370520b30ae7454ca16bb1dc828e4cc3 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 11:51:15 +0600
Subject: [PATCH 145/706] as
---
.../teacher/courses/[courseId]/components/ImageForm.tsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index f97a241..d399809 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -12,6 +12,7 @@ import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { cn } from "@/lib/utils";
import { Course } from "@prisma/client";
+import Image from "next/image";
const formSchema = z.object({
imageUrl: z.string().min(1, {
@@ -75,8 +76,9 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
) : (
-
- current image
+
+
+
)
)}
From 1a265ec3105616cf6dba15a4b1bd5a41a89bacde Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 11:54:50 +0600
Subject: [PATCH 146/706] setup a imageform page
---
.../[courseId]/components/ImageForm.tsx | 31 +++++++------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index d399809..b57ebb0 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -13,6 +13,7 @@ import { useRouter } from "next/navigation";
import { cn } from "@/lib/utils";
import { Course } from "@prisma/client";
import Image from "next/image";
+import {FileUpload} from "@/components/file-upload";
const formSchema = z.object({
imageUrl: z.string().min(1, {
@@ -83,27 +84,19 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
)
)}
{isEditing && (
-
-
- (
-
-
-
-
-
-
- )}
+
+
{
+ if(url) {
+ onSubmit({imageUrl: url})
+ }
+ }}
/>
-
-
- Save
-
+
+ 16:9 aspect ralio recommended
+
-
-
+
+
)}
);
From 5d5cbf3879ea95a9da985d5b48a3022e6b1ff57e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 12:12:44 +0600
Subject: [PATCH 147/706] setup a imageform page
---
src/app/api/uploadthing/styles.css | 0
src/app/globals.css | 1 +
tailwind.config.ts | 6 +++---
3 files changed, 4 insertions(+), 3 deletions(-)
create mode 100644 src/app/api/uploadthing/styles.css
diff --git a/src/app/api/uploadthing/styles.css b/src/app/api/uploadthing/styles.css
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/globals.css b/src/app/globals.css
index 44b7e19..234055f 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -1,3 +1,4 @@
+/*@import 'uploadthing/react/styles.css';*/
@tailwind base;
@tailwind components;
@tailwind utilities;
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 266c06d..ce42fbb 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,6 +1,6 @@
import type { Config } from "tailwindcss";
-
-export default {
+const {withUt} = require('uploadthing/tw');
+export default withUt({
darkMode: ["class"],
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
@@ -59,4 +59,4 @@ export default {
}
},
plugins: [require("tailwindcss-animate")],
-} satisfies Config;
+}) satisfies Config;
From 44d078230239fb686d168ad1ff43cbb63d302c39 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 12:22:57 +0600
Subject: [PATCH 148/706] fixing some bugging
---
package-lock.json | 12 ++++++++----
package.json | 1 -
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index f3aecc4..ca3fcec 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -29,7 +29,6 @@
"react-hot-toast": "^2.5.1",
"tailwind-merge": "^3.0.1",
"tailwindcss-animate": "^1.0.7",
- "uploadthing": "^7.4.4",
"zod": "^3.24.1"
},
"devDependencies": {
@@ -182,6 +181,7 @@
"resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.70.7.tgz",
"integrity": "sha512-TbNwj/mOJhycPygbmicGBS7CNtv5Z8WVheRbLUdP3oPAe/nbSOJVLc8ZPvOejhquF/1vJMKuqY5MWfkcBpvi/g==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"find-my-way-ts": "^0.1.5",
"multipasta": "^0.2.5"
@@ -1248,7 +1248,8 @@
"version": "1.0.0-beta.3",
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0-beta.3.tgz",
"integrity": "sha512-0ifF3BjA1E8SY9C+nUew8RefNOIq0cDlYALPty4rhUm8Rrl6tCM8hBT4bhGhx7I7iXD0uAgt50lgo8dD73ACMw==",
- "license": "MIT"
+ "license": "MIT",
+ "peer": true
},
"node_modules/@swc/counter": {
"version": "0.1.3",
@@ -1844,7 +1845,8 @@
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.5.tgz",
"integrity": "sha512-4GOTMrpGQVzsCH2ruUn2vmwzV/02zF4q+ybhCIrw/Rkt3L8KWcycdC6aJMctJzwN4fXD4SD5F/4B9Sksh5rE0A==",
- "license": "MIT"
+ "license": "MIT",
+ "peer": true
},
"node_modules/follow-redirects": {
"version": "1.15.9",
@@ -2253,7 +2255,8 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.5.tgz",
"integrity": "sha512-c8eMDb1WwZcE02WVjHoOmUVk7fnKU/RmUcosHACglrWAuPQsEJv+E8430sXj6jNc1jHw0zrS16aCjQh4BcEb4A==",
- "license": "MIT"
+ "license": "MIT",
+ "peer": true
},
"node_modules/mz": {
"version": "2.7.0",
@@ -3398,6 +3401,7 @@
"resolved": "https://registry.npmjs.org/uploadthing/-/uploadthing-7.4.4.tgz",
"integrity": "sha512-dgV8LqaKrXSnpDkqzzLbVEmIubMPi8a5bRtIzM+rG5EbZpIZyOG0bByLxdSlkSbK5L6F+HbIGX5eDkLPFNL8dg==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@effect/platform": "0.70.7",
"@standard-schema/spec": "1.0.0-beta.3",
diff --git a/package.json b/package.json
index a99a5e3..467b644 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,6 @@
"react-hot-toast": "^2.5.1",
"tailwind-merge": "^3.0.1",
"tailwindcss-animate": "^1.0.7",
- "uploadthing": "^7.4.4",
"zod": "^3.24.1"
},
"devDependencies": {
From d9c01af2b167e228f6efd940ba8e88a80c715e46 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 22:14:35 +0600
Subject: [PATCH 149/706] now i am fixed that bug
---
next.config.ts | 10 +-
.../[courseId]/components/ImageForm.tsx | 3 -
tailwind.config.ts | 119 +++++++++---------
3 files changed, 68 insertions(+), 64 deletions(-)
diff --git a/next.config.ts b/next.config.ts
index e9ffa30..57b83c6 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -1,7 +1,13 @@
-import type { NextConfig } from "next";
+import { NextConfig } from 'next';
const nextConfig: NextConfig = {
- /* config options here */
+ webpack: (config) => {
+ config.module.rules.push({
+ test: /\.md$/,
+ use: 'null-loader',
+ });
+ return config;
+ },
};
export default nextConfig;
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index b57ebb0..6593e54 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -6,11 +6,8 @@ import { zodResolver } from "@hookform/resolvers/zod";
import axios from "axios";
import {ImageIcon, Pencil, PlusCircle} 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";
-import { cn } from "@/lib/utils";
import { Course } from "@prisma/client";
import Image from "next/image";
import {FileUpload} from "@/components/file-upload";
diff --git a/tailwind.config.ts b/tailwind.config.ts
index ce42fbb..0eb918f 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,62 +1,63 @@
import type { Config } from "tailwindcss";
-const {withUt} = require('uploadthing/tw');
+import { withUt } from "uploadthing/tw";
+
export default withUt({
- darkMode: ["class"],
- content: [
- "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
- "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
- "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
- ],
- theme: {
- extend: {
- colors: {
- background: 'hsl(var(--background))',
- foreground: 'hsl(var(--foreground))',
- card: {
- DEFAULT: 'hsl(var(--card))',
- foreground: 'hsl(var(--card-foreground))'
- },
- popover: {
- DEFAULT: 'hsl(var(--popover))',
- foreground: 'hsl(var(--popover-foreground))'
- },
- primary: {
- DEFAULT: 'hsl(var(--primary))',
- foreground: 'hsl(var(--primary-foreground))'
- },
- secondary: {
- DEFAULT: 'hsl(var(--secondary))',
- foreground: 'hsl(var(--secondary-foreground))'
- },
- muted: {
- DEFAULT: 'hsl(var(--muted))',
- foreground: 'hsl(var(--muted-foreground))'
- },
- accent: {
- DEFAULT: 'hsl(var(--accent))',
- foreground: 'hsl(var(--accent-foreground))'
- },
- destructive: {
- DEFAULT: 'hsl(var(--destructive))',
- foreground: 'hsl(var(--destructive-foreground))'
- },
- border: 'hsl(var(--border))',
- input: 'hsl(var(--input))',
- ring: 'hsl(var(--ring))',
- chart: {
- '1': 'hsl(var(--chart-1))',
- '2': 'hsl(var(--chart-2))',
- '3': 'hsl(var(--chart-3))',
- '4': 'hsl(var(--chart-4))',
- '5': 'hsl(var(--chart-5))'
- }
- },
- borderRadius: {
- lg: 'var(--radius)',
- md: 'calc(var(--radius) - 2px)',
- sm: 'calc(var(--radius) - 4px)'
- }
- }
- },
- plugins: [require("tailwindcss-animate")],
+ darkMode: ["class"],
+ content: [
+ "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
+ ],
+ theme: {
+ extend: {
+ colors: {
+ background: "hsl(var(--background))",
+ foreground: "hsl(var(--foreground))",
+ card: {
+ DEFAULT: "hsl(var(--card))",
+ foreground: "hsl(var(--card-foreground))",
+ },
+ popover: {
+ DEFAULT: "hsl(var(--popover))",
+ foreground: "hsl(var(--popover-foreground))",
+ },
+ primary: {
+ DEFAULT: "hsl(var(--primary))",
+ foreground: "hsl(var(--primary-foreground))",
+ },
+ secondary: {
+ DEFAULT: "hsl(var(--secondary))",
+ foreground: "hsl(var(--secondary-foreground))",
+ },
+ muted: {
+ DEFAULT: "hsl(var(--muted))",
+ foreground: "hsl(var(--muted-foreground))",
+ },
+ accent: {
+ DEFAULT: "hsl(var(--accent))",
+ foreground: "hsl(var(--accent-foreground))",
+ },
+ destructive: {
+ DEFAULT: "hsl(var(--destructive))",
+ foreground: "hsl(var(--destructive-foreground))",
+ },
+ border: "hsl(var(--border))",
+ input: "hsl(var(--input))",
+ ring: "hsl(var(--ring))",
+ chart: {
+ "1": "hsl(var(--chart-1))",
+ "2": "hsl(var(--chart-2))",
+ "3": "hsl(var(--chart-3))",
+ "4": "hsl(var(--chart-4))",
+ "5": "hsl(var(--chart-5))",
+ },
+ },
+ borderRadius: {
+ lg: "var(--radius)",
+ md: "calc(var(--radius) - 2px)",
+ sm: "calc(var(--radius) - 4px)",
+ },
+ },
+ },
+ plugins: [require("tailwindcss-animate")],
}) satisfies Config;
From d4b151baf633de4308088ef399d1f32b082ae106 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 22:25:44 +0600
Subject: [PATCH 150/706] changed image form dont update
---
next.config.ts | 14 ++++++--------
.../courses/[courseId]/components/ImageForm.tsx | 2 +-
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/next.config.ts b/next.config.ts
index 57b83c6..7fbb66d 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -1,13 +1,11 @@
-import { NextConfig } from 'next';
+import type { NextConfig } from "next";
const nextConfig: NextConfig = {
- webpack: (config) => {
- config.module.rules.push({
- test: /\.md$/,
- use: 'null-loader',
- });
- return config;
- },
+images:{
+ domains:[
+ 'utfs.io'
+ ]
+}
};
export default nextConfig;
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index 6593e54..a9172e5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -75,7 +75,7 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
) : (
-
+
)
From 5c684afb45f0f212490bc320a0a1b51dbd795788 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 22:33:26 +0600
Subject: [PATCH 151/706] fixeeeed buggg yessssss
---
.../teacher/courses/[courseId]/components/ImageForm.tsx | 2 +-
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index a9172e5..314bcbb 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -75,7 +75,7 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
) : (
-
+
)
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 ca13916..93876ad 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -54,9 +54,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
}}
courseId={course.id}
/>
From f749660338bfac9c4a70ef054b86ac5cc1d2af7b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:02:01 +0600
Subject: [PATCH 152/706] clean the image form
---
.../teacher/courses/[courseId]/components/ImageForm.tsx | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index 314bcbb..d619ebd 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -27,14 +27,7 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
- const form = useForm>({
- resolver: zodResolver(formSchema),
- defaultValues: {
- imageUrl: initialData?.imageUrl ?? "",
- },
- });
- const { isSubmitting, isDirty } = form.formState;
const toggleEdit = () => setIsEditing((current) => !current);
const onSubmit = async (values: z.infer) => {
From 838f044e976d0e548eb83f6d607e57077c2df75f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:02:45 +0600
Subject: [PATCH 153/706] clean the image form
---
.../teacher/courses/[courseId]/components/ImageForm.tsx | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index d619ebd..1923a9d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -1,8 +1,6 @@
"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 {ImageIcon, Pencil, PlusCircle} from "lucide-react";
import { Button } from "@/components/ui/button";
From 1bd78ec9a74575cd21c3b222e6cae73010f16266 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:10:19 +0600
Subject: [PATCH 154/706] new ui compoenents
---
package-lock.json | 1596 +++++++++++++----
package.json | 4 +-
.../[courseId]/components/ImageForm.tsx | 2 +-
3 files changed, 1286 insertions(+), 316 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index ca3fcec..bc1b6ba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,14 +11,16 @@
"@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-dialog": "^1.1.6",
"@radix-ui/react-label": "^2.1.1",
+ "@radix-ui/react-popover": "^1.1.6",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-visually-hidden": "^1.1.1",
"@uploadthing/react": "^7.1.5",
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
+ "cmdk": "^1.0.0",
"init": "^0.1.2",
"lucide-react": "^0.474.0",
"next": "15.1.6",
@@ -53,6 +55,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/@babel/runtime": {
+ "version": "7.26.7",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz",
+ "integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "regenerator-runtime": "^0.14.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
"node_modules/@clerk/backend": {
"version": "1.23.11",
"resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-1.23.11.tgz",
@@ -200,6 +214,44 @@
"tslib": "^2.4.0"
}
},
+ "node_modules/@floating-ui/core": {
+ "version": "1.6.9",
+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.9.tgz",
+ "integrity": "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/utils": "^0.2.9"
+ }
+ },
+ "node_modules/@floating-ui/dom": {
+ "version": "1.6.13",
+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.13.tgz",
+ "integrity": "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/core": "^1.6.0",
+ "@floating-ui/utils": "^0.2.9"
+ }
+ },
+ "node_modules/@floating-ui/react-dom": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz",
+ "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/dom": "^1.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.8.0",
+ "react-dom": ">=16.8.0"
+ }
+ },
+ "node_modules/@floating-ui/utils": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz",
+ "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==",
+ "license": "MIT"
+ },
"node_modules/@hookform/resolvers": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.10.0.tgz",
@@ -892,6 +944,70 @@
"integrity": "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==",
"license": "MIT"
},
+ "node_modules/@radix-ui/react-arrow": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.2.tgz",
+ "integrity": "sha512-G+KcpzXHq24iH0uGG/pF8LyzpFJYGD4RfLjCIBfGdSLXvjLHST31RUiRVrupIBMvIppMgSzQ6l66iAxl03tdlg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.0.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-arrow/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz",
+ "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.1.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-arrow/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz",
+ "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==",
+ "license": "MIT",
+ "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"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"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",
@@ -923,25 +1039,25 @@
}
},
"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==",
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.6.tgz",
+ "integrity": "sha512-/IVhJV5AceX620DUJ4uYVMymzsipdKBzo3edo+omeskCKGm9FRHM0ebIdbPnlQVJqyuHbuBltQUOG2mOTq2IYw==",
"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-dismissable-layer": "1.1.5",
"@radix-ui/react-focus-guards": "1.1.1",
- "@radix-ui/react-focus-scope": "1.1.1",
+ "@radix-ui/react-focus-scope": "1.1.2",
"@radix-ui/react-id": "1.1.0",
- "@radix-ui/react-portal": "1.1.3",
+ "@radix-ui/react-portal": "1.1.4",
"@radix-ui/react-presence": "1.1.2",
- "@radix-ui/react-primitive": "2.0.1",
- "@radix-ui/react-slot": "1.1.1",
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-slot": "1.1.2",
"@radix-ui/react-use-controllable-state": "1.1.0",
"aria-hidden": "^1.2.4",
- "react-remove-scroll": "^2.6.2"
+ "react-remove-scroll": "^2.6.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -958,17 +1074,13 @@
}
}
},
- "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==",
+ "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz",
+ "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==",
"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"
+ "@radix-ui/react-slot": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
@@ -985,11 +1097,14 @@
}
}
},
- "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==",
+ "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz",
+ "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==",
"license": "MIT",
+ "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"
@@ -1000,15 +1115,17 @@
}
}
},
- "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==",
+ "node_modules/@radix-ui/react-dismissable-layer": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.5.tgz",
+ "integrity": "sha512-E4TywXY6UsXNRhFrECa5HAvE5/4BFcGyfTyK36gP+pAW1ed7UTK4vKwdr53gAJYwqbfCWC6ATvJa3J3R/9+Qrg==",
"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-primitive": "2.0.2",
+ "@radix-ui/react-use-callback-ref": "1.1.0",
+ "@radix-ui/react-use-escape-keydown": "1.1.0"
},
"peerDependencies": {
"@types/react": "*",
@@ -1025,79 +1142,71 @@
}
}
},
- "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==",
+ "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz",
+ "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-use-layout-effect": "1.1.0"
+ "@radix-ui/react-slot": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ "@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-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==",
+ "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz",
+ "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.0.1"
+ "@radix-ui/react-compose-refs": "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"
+ "react": "^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",
- "integrity": "sha512-NciRqhXnGojhT93RPyDaMPfLH3ZSl4jjIFbZQ1b/vxvZEdHsBZ49wP9w8L3HzUQwep01LcWtkUvm0OVB5JAHTw==",
+ "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",
- "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"
+ "react": "^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": {
+ "node_modules/@radix-ui/react-focus-scope": {
"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==",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.2.tgz",
+ "integrity": "sha512-zxwE80FCU7lcXUGWkdt6XpTTCKPitG1XKOwViTxHVKIJhZl9MvIl2dVHeZENCWD9+EdWv05wlaEkRXUykU27RA==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.1",
- "@radix-ui/react-use-layout-effect": "1.1.0"
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-use-callback-ref": "1.1.0"
},
"peerDependencies": {
"@types/react": "*",
@@ -1114,13 +1223,13 @@
}
}
},
- "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==",
+ "node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz",
+ "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-slot": "1.1.1"
+ "@radix-ui/react-slot": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
@@ -1137,10 +1246,10 @@
}
}
},
- "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",
- "integrity": "sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g==",
+ "node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz",
+ "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.1"
@@ -1155,11 +1264,14 @@
}
}
},
- "node_modules/@radix-ui/react-use-callback-ref": {
+ "node_modules/@radix-ui/react-id": {
"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==",
+ "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"
@@ -1170,47 +1282,97 @@
}
}
},
- "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==",
+ "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-use-callback-ref": "1.1.0"
+ "@radix-ui/react-primitive": "2.0.1"
},
"peerDependencies": {
"@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ "@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-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==",
+ "node_modules/@radix-ui/react-popover": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.6.tgz",
+ "integrity": "sha512-NQouW0x4/GnkFJ/pRqsIS3rM/k97VzKnVb2jB7Gq7VEGPy5g7uNV1ykySFt7eWSp3i2uSGFwaJcvIRJBAHmmFg==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-use-callback-ref": "1.1.0"
+ "@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.5",
+ "@radix-ui/react-focus-guards": "1.1.1",
+ "@radix-ui/react-focus-scope": "1.1.2",
+ "@radix-ui/react-id": "1.1.0",
+ "@radix-ui/react-popper": "1.2.2",
+ "@radix-ui/react-portal": "1.1.4",
+ "@radix-ui/react-presence": "1.1.2",
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-slot": "1.1.2",
+ "@radix-ui/react-use-controllable-state": "1.1.0",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.3"
},
"peerDependencies": {
"@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ "@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-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==",
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz",
+ "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.1.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-popover/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz",
+ "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==",
"license": "MIT",
+ "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"
@@ -1221,13 +1383,22 @@
}
}
},
- "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==",
+ "node_modules/@radix-ui/react-popper": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.2.tgz",
+ "integrity": "sha512-Rvqc3nOpwseCyj/rgjlJDYAgyfw7OC1tTkKn2ivhaMGcYt8FSBlahHOZak2i3QwkRXUXgGgzeEe2RuqeEHuHgA==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.0.1"
+ "@floating-ui/react-dom": "^2.0.0",
+ "@radix-ui/react-arrow": "1.1.2",
+ "@radix-ui/react-compose-refs": "1.1.1",
+ "@radix-ui/react-context": "1.1.1",
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-use-callback-ref": "1.1.0",
+ "@radix-ui/react-use-layout-effect": "1.1.0",
+ "@radix-ui/react-use-rect": "1.1.0",
+ "@radix-ui/react-use-size": "1.1.0",
+ "@radix-ui/rect": "1.1.0"
},
"peerDependencies": {
"@types/react": "*",
@@ -1244,322 +1415,1113 @@
}
}
},
- "node_modules/@standard-schema/spec": {
- "version": "1.0.0-beta.3",
- "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0-beta.3.tgz",
- "integrity": "sha512-0ifF3BjA1E8SY9C+nUew8RefNOIq0cDlYALPty4rhUm8Rrl6tCM8hBT4bhGhx7I7iXD0uAgt50lgo8dD73ACMw==",
+ "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz",
+ "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==",
"license": "MIT",
- "peer": true
- },
- "node_modules/@swc/counter": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
- "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==",
- "license": "Apache-2.0"
- },
- "node_modules/@swc/helpers": {
+ "dependencies": {
+ "@radix-ui/react-slot": "1.1.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-popper/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz",
+ "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==",
+ "license": "MIT",
+ "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"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-portal": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.4.tgz",
+ "integrity": "sha512-sn2O9k1rPFYVyKd5LAJfo96JlSGVFpa1fS6UuBJfrZadudiw5tAmru+n1x7aMRQ84qDM71Zh1+SzK5QwU0tJfA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.0.2",
+ "@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-portal/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz",
+ "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.1.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-portal/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz",
+ "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==",
+ "license": "MIT",
+ "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"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "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",
+ "integrity": "sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g==",
+ "license": "MIT",
+ "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"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "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/@radix-ui/react-use-rect": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz",
+ "integrity": "sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/rect": "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-size": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz",
+ "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==",
+ "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-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/@radix-ui/rect": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz",
+ "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==",
+ "license": "MIT"
+ },
+ "node_modules/@standard-schema/spec": {
+ "version": "1.0.0-beta.3",
+ "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0-beta.3.tgz",
+ "integrity": "sha512-0ifF3BjA1E8SY9C+nUew8RefNOIq0cDlYALPty4rhUm8Rrl6tCM8hBT4bhGhx7I7iXD0uAgt50lgo8dD73ACMw==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@swc/counter": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
+ "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/@swc/helpers": {
"version": "0.5.15",
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz",
"integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==",
"license": "Apache-2.0",
"dependencies": {
- "tslib": "^2.8.0"
+ "tslib": "^2.8.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "20.17.16",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz",
+ "integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~6.19.2"
+ }
+ },
+ "node_modules/@types/prop-types": {
+ "version": "15.7.14",
+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz",
+ "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==",
+ "license": "MIT",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/@types/react": {
+ "version": "19.0.8",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.8.tgz",
+ "integrity": "sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "csstype": "^3.0.2"
+ }
+ },
+ "node_modules/@types/react-dom": {
+ "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==",
+ "devOptional": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "^19.0.0"
+ }
+ },
+ "node_modules/@uploadthing/mime-types": {
+ "version": "0.3.4",
+ "resolved": "https://registry.npmjs.org/@uploadthing/mime-types/-/mime-types-0.3.4.tgz",
+ "integrity": "sha512-EB0o0a4y++UJFMLqS8LDVhSQgXUllG6t5fwl5cbmOM0Uay8YY5Nc/JjFwzJ8wccdIKz4oYwQW7EOSfUyaMPbfw==",
+ "license": "MIT"
+ },
+ "node_modules/@uploadthing/react": {
+ "version": "7.1.5",
+ "resolved": "https://registry.npmjs.org/@uploadthing/react/-/react-7.1.5.tgz",
+ "integrity": "sha512-D0lP4YnUWw5LFHrLuL+sq26wlul9dGE70G+oOQ+qkM1ZqSeKSGvIdAIOAQUBj2qQi4Re7o0VpF3+3qBF3svN6A==",
+ "license": "MIT",
+ "dependencies": {
+ "@uploadthing/shared": "7.1.5",
+ "file-selector": "0.6.0"
+ },
+ "peerDependencies": {
+ "next": "*",
+ "react": "^17.0.2 || ^18.0.0 || ^19.0.0",
+ "uploadthing": "^7.2.0"
+ },
+ "peerDependenciesMeta": {
+ "next": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@uploadthing/shared": {
+ "version": "7.1.5",
+ "resolved": "https://registry.npmjs.org/@uploadthing/shared/-/shared-7.1.5.tgz",
+ "integrity": "sha512-5ePSiR2CPA5a8gfPqsHpE/uPwGG9iPqhxcFpeLGnEuExPqIi5ZY7upZgpc+6T1gMxwfbP0O5X4043TTNk3q/pA==",
+ "license": "MIT",
+ "dependencies": {
+ "@uploadthing/mime-types": "0.3.4",
+ "effect": "3.11.5",
+ "sqids": "^0.3.0"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
+ "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/any-promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
+ "license": "MIT"
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "license": "ISC",
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/arg": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
+ "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/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/attr-accept": {
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.5.tgz",
+ "integrity": "sha512-0bDNnY/u6pPwHDMoF0FieU354oBi0a8rD9FcsLwzcGWbc8KS8KPIi7y+s13OlVY+gMWc/9xEMUgNE6Qm8ZllYQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "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",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "license": "MIT"
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "license": "MIT",
+ "dependencies": {
+ "fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/busboy": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
+ "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+ "dependencies": {
+ "streamsearch": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=10.16.0"
+ }
+ },
+ "node_modules/camelcase-css": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
+ "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001696",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001696.tgz",
+ "integrity": "sha512-pDCPkvzfa39ehJtJ+OwGT/2yvT2SbjfHhiIW2LWOAcMQ7BzwxT/XuyUp4OTOd0XFWA6BKw0JalnBHgSi5DGJBQ==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "CC-BY-4.0"
+ },
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
+ "license": "MIT",
+ "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"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chokidar/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/class-variance-authority": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz",
+ "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "clsx": "^2.1.1"
+ },
+ "funding": {
+ "url": "https://polar.sh/cva"
}
},
- "node_modules/@types/node": {
- "version": "20.17.16",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz",
- "integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==",
- "dev": true,
+ "node_modules/client-only": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
+ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",
+ "license": "MIT"
+ },
+ "node_modules/clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/cmdk": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/cmdk/-/cmdk-1.0.0.tgz",
+ "integrity": "sha512-gDzVf0a09TvoJ5jnuPvygTB77+XdOSwEmJ88L6XPFPlv7T3RxbP9jgenfylrAMD0+Le1aO0nVjQUzl2g+vjz5Q==",
"license": "MIT",
"dependencies": {
- "undici-types": "~6.19.2"
+ "@radix-ui/react-dialog": "1.0.5",
+ "@radix-ui/react-primitive": "1.0.3"
+ },
+ "peerDependencies": {
+ "react": "^18.0.0",
+ "react-dom": "^18.0.0"
}
},
- "node_modules/@types/react": {
- "version": "19.0.8",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.8.tgz",
- "integrity": "sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==",
- "devOptional": true,
+ "node_modules/cmdk/node_modules/@radix-ui/primitive": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz",
+ "integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==",
"license": "MIT",
"dependencies": {
- "csstype": "^3.0.2"
+ "@babel/runtime": "^7.13.10"
}
},
- "node_modules/@types/react-dom": {
- "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==",
- "devOptional": true,
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz",
+ "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==",
"license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-dismissable-layer": "1.0.5",
+ "@radix-ui/react-focus-guards": "1.0.1",
+ "@radix-ui/react-focus-scope": "1.0.4",
+ "@radix-ui/react-id": "1.0.1",
+ "@radix-ui/react-portal": "1.0.4",
+ "@radix-ui/react-presence": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-slot": "1.0.2",
+ "@radix-ui/react-use-controllable-state": "1.0.1",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.5"
+ },
"peerDependencies": {
- "@types/react": "^19.0.0"
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
}
},
- "node_modules/@uploadthing/mime-types": {
- "version": "0.3.4",
- "resolved": "https://registry.npmjs.org/@uploadthing/mime-types/-/mime-types-0.3.4.tgz",
- "integrity": "sha512-EB0o0a4y++UJFMLqS8LDVhSQgXUllG6t5fwl5cbmOM0Uay8YY5Nc/JjFwzJ8wccdIKz4oYwQW7EOSfUyaMPbfw==",
- "license": "MIT"
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz",
+ "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
},
- "node_modules/@uploadthing/react": {
- "version": "7.1.5",
- "resolved": "https://registry.npmjs.org/@uploadthing/react/-/react-7.1.5.tgz",
- "integrity": "sha512-D0lP4YnUWw5LFHrLuL+sq26wlul9dGE70G+oOQ+qkM1ZqSeKSGvIdAIOAQUBj2qQi4Re7o0VpF3+3qBF3svN6A==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz",
+ "integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==",
"license": "MIT",
"dependencies": {
- "@uploadthing/shared": "7.1.5",
- "file-selector": "0.6.0"
+ "@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "next": "*",
- "react": "^17.0.2 || ^18.0.0 || ^19.0.0",
- "uploadthing": "^7.2.0"
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
- "next": {
+ "@types/react": {
"optional": true
}
}
},
- "node_modules/@uploadthing/shared": {
- "version": "7.1.5",
- "resolved": "https://registry.npmjs.org/@uploadthing/shared/-/shared-7.1.5.tgz",
- "integrity": "sha512-5ePSiR2CPA5a8gfPqsHpE/uPwGG9iPqhxcFpeLGnEuExPqIi5ZY7upZgpc+6T1gMxwfbP0O5X4043TTNk3q/pA==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz",
+ "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==",
"license": "MIT",
"dependencies": {
- "@uploadthing/mime-types": "0.3.4",
- "effect": "3.11.5",
- "sqids": "^0.3.0"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-callback-ref": "1.0.1",
+ "@radix-ui/react-use-escape-keydown": "1.0.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
}
},
- "node_modules/ansi-regex": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
- "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
+ "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
"license": "MIT",
- "engines": {
- "node": ">=12"
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
},
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz",
+ "integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==",
"license": "MIT",
- "engines": {
- "node": ">=12"
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-callback-ref": "1.0.1"
},
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/any-promise": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
- "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
- "license": "MIT"
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz",
+ "integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
},
- "node_modules/anymatch": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
- "license": "ISC",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz",
+ "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==",
+ "license": "MIT",
"dependencies": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-callback-ref": "1.0.1"
},
- "engines": {
- "node": ">= 8"
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
}
},
- "node_modules/arg": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
- "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
- "license": "MIT"
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
+ "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
},
- "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==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz",
+ "integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==",
"license": "MIT",
"dependencies": {
- "tslib": "^2.0.0"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.1"
},
- "engines": {
- "node": ">=10"
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "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/attr-accept": {
- "version": "2.2.5",
- "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.5.tgz",
- "integrity": "sha512-0bDNnY/u6pPwHDMoF0FieU354oBi0a8rD9FcsLwzcGWbc8KS8KPIi7y+s13OlVY+gMWc/9xEMUgNE6Qm8ZllYQ==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz",
+ "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==",
"license": "MIT",
- "engines": {
- "node": ">=4"
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/axios": {
- "version": "1.7.9",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz",
- "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz",
+ "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==",
"license": "MIT",
"dependencies": {
- "follow-redirects": "^1.15.6",
- "form-data": "^4.0.0",
- "proxy-from-env": "^1.1.0"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
}
},
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "license": "MIT"
- },
- "node_modules/binary-extensions": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
- "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz",
+ "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==",
"license": "MIT",
- "engines": {
- "node": ">=8"
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-use-layout-effect": "1.0.1"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
}
},
- "node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz",
+ "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==",
"license": "MIT",
"dependencies": {
- "balanced-match": "^1.0.0"
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
+ "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==",
"license": "MIT",
"dependencies": {
- "fill-range": "^7.1.1"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.1"
},
- "engines": {
- "node": ">=8"
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/busboy": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
- "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz",
+ "integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==",
+ "license": "MIT",
"dependencies": {
- "streamsearch": "^1.1.0"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-callback-ref": "1.0.1"
},
- "engines": {
- "node": ">=10.16.0"
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/camelcase-css": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
- "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
+ "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
"license": "MIT",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/caniuse-lite": {
- "version": "1.0.30001696",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001696.tgz",
- "integrity": "sha512-pDCPkvzfa39ehJtJ+OwGT/2yvT2SbjfHhiIW2LWOAcMQ7BzwxT/XuyUp4OTOd0XFWA6BKw0JalnBHgSi5DGJBQ==",
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/browserslist"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
}
- ],
- "license": "CC-BY-4.0"
+ }
},
- "node_modules/chokidar": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
- "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
+ "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll": {
+ "version": "2.5.5",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz",
+ "integrity": "sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==",
"license": "MIT",
"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"
+ "react-remove-scroll-bar": "^2.3.3",
+ "react-style-singleton": "^2.2.1",
+ "tslib": "^2.1.0",
+ "use-callback-ref": "^1.3.0",
+ "use-sidecar": "^1.1.2"
},
"engines": {
- "node": ">= 8.10.0"
+ "node": ">=10"
},
- "funding": {
- "url": "https://paulmillr.com/funding/"
+ "peerDependencies": {
+ "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
- "optionalDependencies": {
- "fsevents": "~2.3.2"
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/chokidar/node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "license": "ISC",
+ "node_modules/cmdk/node_modules/@radix-ui/react-primitive": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz",
+ "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==",
+ "license": "MIT",
"dependencies": {
- "is-glob": "^4.0.1"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-slot": "1.0.2"
},
- "engines": {
- "node": ">= 6"
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
}
},
- "node_modules/class-variance-authority": {
- "version": "0.7.1",
- "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz",
- "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==",
- "license": "Apache-2.0",
+ "node_modules/cmdk/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
+ "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==",
+ "license": "MIT",
"dependencies": {
- "clsx": "^2.1.1"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.1"
},
- "funding": {
- "url": "https://polar.sh/cva"
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/client-only": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
- "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",
- "license": "MIT"
+ "node_modules/cmdk/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz",
+ "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
},
- "node_modules/clsx": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
- "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "node_modules/cmdk/node_modules/@types/react": {
+ "version": "18.3.18",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.18.tgz",
+ "integrity": "sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==",
"license": "MIT",
- "engines": {
- "node": ">=6"
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "@types/prop-types": "*",
+ "csstype": "^3.0.2"
}
},
"node_modules/color": {
@@ -2882,6 +3844,12 @@
"node": ">=8.10.0"
}
},
+ "node_modules/regenerator-runtime": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
+ "license": "MIT"
+ },
"node_modules/resolve": {
"version": "1.22.10",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
diff --git a/package.json b/package.json
index 467b644..a15a00b 100644
--- a/package.json
+++ b/package.json
@@ -12,14 +12,16 @@
"@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-dialog": "^1.1.6",
"@radix-ui/react-label": "^2.1.1",
+ "@radix-ui/react-popover": "^1.1.6",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-visually-hidden": "^1.1.1",
"@uploadthing/react": "^7.1.5",
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
+ "cmdk": "^1.0.0",
"init": "^0.1.2",
"lucide-react": "^0.474.0",
"next": "15.1.6",
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index 1923a9d..4285fa1 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -66,7 +66,7 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
) : (
-
+
)
From a44ad575cd031674264fc97fe80f6f573c524ab1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:20:41 +0600
Subject: [PATCH 155/706] new ui compoenents
---
src/components/ui/combobox.tsx | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 src/components/ui/combobox.tsx
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
new file mode 100644
index 0000000..e69de29
From 0302c06167fb15147dac1481999623f0cbccad04 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:22:40 +0600
Subject: [PATCH 156/706] new ui compoenents
---
src/components/ui/combobox.tsx | 94 ++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index e69de29..1031299 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -0,0 +1,94 @@
+"use client"
+
+import * as React from "react"
+import { Check, ChevronsUpDown } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+import { Button } from "@/components/ui/button"
+import {
+ Command,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+} from "@/components/ui/command"
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover"
+
+const frameworks = [
+ {
+ value: "next.js",
+ label: "Next.js",
+ },
+ {
+ value: "sveltekit",
+ label: "SvelteKit",
+ },
+ {
+ value: "nuxt.js",
+ label: "Nuxt.js",
+ },
+ {
+ value: "remix",
+ label: "Remix",
+ },
+ {
+ value: "astro",
+ label: "Astro",
+ },
+]
+
+export function ComboboxDemo() {
+ const [open, setOpen] = React.useState(false)
+ const [value, setValue] = React.useState("")
+
+ return (
+
+
+
+ {value
+ ? frameworks.find((framework) => framework.value === value)?.label
+ : "Select framework..."}
+
+
+
+
+
+
+
+ No framework found.
+
+ {frameworks.map((framework) => (
+ {
+ setValue(currentValue === value ? "" : currentValue)
+ setOpen(false)
+ }}
+ >
+
+ {framework.label}
+
+ ))}
+
+
+
+
+
+ )
+}
From 467a345b751385a47ff9556f5816ba202824be01 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:28:34 +0600
Subject: [PATCH 157/706] new ui compoenents
---
src/components/ui/combobox.tsx | 28 ++--------------------------
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 1031299..5a58367 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -1,5 +1,3 @@
-"use client"
-
import * as React from "react"
import { Check, ChevronsUpDown } from "lucide-react"
@@ -19,32 +17,9 @@ import {
PopoverTrigger,
} from "@/components/ui/popover"
-const frameworks = [
- {
- value: "next.js",
- label: "Next.js",
- },
- {
- value: "sveltekit",
- label: "SvelteKit",
- },
- {
- value: "nuxt.js",
- label: "Nuxt.js",
- },
- {
- value: "remix",
- label: "Remix",
- },
- {
- value: "astro",
- label: "Astro",
- },
-]
-
export function ComboboxDemo() {
const [open, setOpen] = React.useState(false)
- const [value, setValue] = React.useState("")
+ const [value, setValue] = React.useState("") // Убедитесь, что value - строка
return (
@@ -72,6 +47,7 @@ export function ComboboxDemo() {
key={framework.value}
value={framework.value}
onSelect={(currentValue) => {
+ // Проверка: если текущее значение не совпадает с выбранным
setValue(currentValue === value ? "" : currentValue)
setOpen(false)
}}
From a01b70e78da0397c1f64f82d50fb2aae4b2412b2 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:30:27 +0600
Subject: [PATCH 158/706] new ui compoenents
---
src/components/ui/combobox.tsx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 5a58367..4a1478a 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -16,8 +16,12 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover"
-
-export function ComboboxDemo() {
+interface ComboboxProps{
+ options:{label:string; value:string}[]
+ value?:string;
+ onChange?:(value:string) => void;
+}
+export const ComboboxDemo = () =>{
const [open, setOpen] = React.useState(false)
const [value, setValue] = React.useState("") // Убедитесь, что value - строка
From 44c44b514ae09f5fcb2b3aef340b39a89506370c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:30:44 +0600
Subject: [PATCH 159/706] new ui compoenents
---
src/components/ui/combobox.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 4a1478a..b000357 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -21,7 +21,9 @@ interface ComboboxProps{
value?:string;
onChange?:(value:string) => void;
}
-export const ComboboxDemo = () =>{
+export const ComboboxDemo = ({
+ options
+ }) =>{
const [open, setOpen] = React.useState(false)
const [value, setValue] = React.useState("") // Убедитесь, что value - строка
From 9ead736fb1e666f66bd715eb65b245ab6058ff42 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:31:01 +0600
Subject: [PATCH 160/706] new ui compoenents
---
src/components/ui/combobox.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index b000357..2d70915 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -22,8 +22,8 @@ interface ComboboxProps{
onChange?:(value:string) => void;
}
export const ComboboxDemo = ({
- options
- }) =>{
+ options,
+ value,}) =>{
const [open, setOpen] = React.useState(false)
const [value, setValue] = React.useState("") // Убедитесь, что value - строка
From 83c12150078d2c1e5ccd5cf8c0f34907f73ab9e7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:31:16 +0600
Subject: [PATCH 161/706] new ui compoenents
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 2d70915..933ab48 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -23,7 +23,7 @@ interface ComboboxProps{
}
export const ComboboxDemo = ({
options,
- value,}) =>{
+ value,onChange}) =>{
const [open, setOpen] = React.useState(false)
const [value, setValue] = React.useState("") // Убедитесь, что value - строка
From 07b37582b46846ade0f185759a5658daa3588c0e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:31:23 +0600
Subject: [PATCH 162/706] new ui compoenents
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 933ab48..b651a01 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -23,7 +23,7 @@ interface ComboboxProps{
}
export const ComboboxDemo = ({
options,
- value,onChange}) =>{
+ value,onChange}: ComboboxProps) =>{
const [open, setOpen] = React.useState(false)
const [value, setValue] = React.useState("") // Убедитесь, что value - строка
From 2f2b67a9219db402557917ff468b4533ae695e95 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:32:22 +0600
Subject: [PATCH 163/706] new ui compoenents
---
src/components/ui/combobox.tsx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index b651a01..e4d5794 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -25,8 +25,6 @@ export const ComboboxDemo = ({
options,
value,onChange}: ComboboxProps) =>{
const [open, setOpen] = React.useState(false)
- const [value, setValue] = React.useState("") // Убедитесь, что value - строка
-
return (
@@ -37,7 +35,7 @@ export const ComboboxDemo = ({
className="w-[200px] justify-between"
>
{value
- ? frameworks.find((framework) => framework.value === value)?.label
+ ? options.find((framework) => framework.value === value)?.label
: "Select framework..."}
From 7ea1ffe0c14ef0a172d5b5fa4bb7d996a16cbd35 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:32:36 +0600
Subject: [PATCH 164/706] new ui compoenents
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index e4d5794..c3be898 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -35,7 +35,7 @@ export const ComboboxDemo = ({
className="w-[200px] justify-between"
>
{value
- ? options.find((framework) => framework.value === value)?.label
+ ? options.find((option) => option.value === value)?.label
: "Select framework..."}
From 72e6b92cdafa779148e03215b68a921464970444 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:32:58 +0600
Subject: [PATCH 165/706] new ui compoenents
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index c3be898..810db67 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -36,7 +36,7 @@ export const ComboboxDemo = ({
>
{value
? options.find((option) => option.value === value)?.label
- : "Select framework..."}
+ : "Select option..."}
From 0939fbe76f10ccf7448513c4716462a8125b1326 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:33:39 +0600
Subject: [PATCH 166/706] changing shadcn ui components
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 810db67..2ec741f 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -46,7 +46,7 @@ export const ComboboxDemo = ({
No framework found.
- {frameworks.map((framework) => (
+ {options.map((option) => (
Date: Sun, 9 Feb 2025 23:33:58 +0600
Subject: [PATCH 167/706] changing shadcn ui components
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 2ec741f..8097722 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -48,7 +48,7 @@ export const ComboboxDemo = ({
{options.map((option) => (
{
// Проверка: если текущее значение не совпадает с выбранным
From 26e956e95c21a6265642d47a08d2e782091131ec Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:34:33 +0600
Subject: [PATCH 168/706] changing shadcn ui components
---
src/components/ui/combobox.tsx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 8097722..74299d4 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -49,10 +49,8 @@ export const ComboboxDemo = ({
{options.map((option) => (
{
- // Проверка: если текущее значение не совпадает с выбранным
- setValue(currentValue === value ? "" : currentValue)
+ onSelect={() => {
+ onChange(option.value === value ? "" : currentValue)
setOpen(false)
}}
>
From 21b3235137341fe913802f9eb5d10639a7a5b08d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:34:43 +0600
Subject: [PATCH 169/706] changing shadcn ui components
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 74299d4..542596b 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -50,7 +50,7 @@ export const ComboboxDemo = ({
{
- onChange(option.value === value ? "" : currentValue)
+ onChange(option.value === value ? "" : option.value)
setOpen(false)
}}
>
From 5543fbf3af4b4dee23788449fa13e437bcb9e91e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:36:27 +0600
Subject: [PATCH 170/706] changing shadcn ui components
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 542596b..95c0f44 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -57,7 +57,7 @@ export const ComboboxDemo = ({
{framework.label}
From 8affc0a7c60adc9e6e32a1c0aec1b872e0aaf5a0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:37:08 +0600
Subject: [PATCH 171/706] changing shadcn ui components
---
src/components/ui/combobox.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 95c0f44..0f50c66 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -60,7 +60,7 @@ export const ComboboxDemo = ({
value === option.value ? "opacity-100" : "opacity-0"
)}
/>
- {framework.label}
+ {option.label}
))}
From 1ef72cb32d5beeeb0d4dc20cc65b0d987f68aa3a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:41:16 +0600
Subject: [PATCH 172/706] changing shadcn ui components
---
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 2 ++
1 file changed, 2 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 93876ad..f2c374a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -23,6 +23,8 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
+ const ca
+
const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
const totalFields = requiredFields.length;
const completedFields = requiredFields.filter(Boolean).length;
From 65e74e8f7efc91bab1e1fbbdfce440983ccced25 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:51:29 +0600
Subject: [PATCH 173/706] new feature
---
.../(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 f2c374a..c98f26a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -23,7 +23,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
- const ca
+ const categories
const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
const totalFields = requiredFields.length;
From a4d329c2027df8ba1c70bd621c1a9ecb9641e31d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:51:39 +0600
Subject: [PATCH 174/706] new feature
---
.../(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 c98f26a..357731b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -23,7 +23,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
- const categories
+ const categories = await
const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
const totalFields = requiredFields.length;
From e49627231f1c88e6fcf0032f836601d45e98653d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:51:46 +0600
Subject: [PATCH 175/706] new feature
---
.../(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 357731b..3c3843b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -23,7 +23,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
- const categories = await
+ const categories = await db
const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
const totalFields = requiredFields.length;
From 85de6ff4fa201294788ed895cd40ca8bc587cac0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 9 Feb 2025 23:51:54 +0600
Subject: [PATCH 176/706] new feature
---
.../(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 3c3843b..04c3e56 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -23,7 +23,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
- const categories = await db
+ const categories = await db.category.find
const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
const totalFields = requiredFields.length;
From de8fcdec18fbd1fe73ac3be21618f72f0f541d08 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 15:28:02 +0600
Subject: [PATCH 177/706] fixed ui components
---
package-lock.json | 509 +-----------------
package.json | 2 +-
.../teacher/courses/[courseId]/page.tsx | 2 +-
3 files changed, 11 insertions(+), 502 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index bc1b6ba..00f9db1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -20,7 +20,7 @@
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
- "cmdk": "^1.0.0",
+ "cmdk": "^1.0.4",
"init": "^0.1.2",
"lucide-react": "^0.474.0",
"next": "15.1.6",
@@ -55,18 +55,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@babel/runtime": {
- "version": "7.26.7",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz",
- "integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==",
- "license": "MIT",
- "dependencies": {
- "regenerator-runtime": "^0.14.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
"node_modules/@clerk/backend": {
"version": "1.23.11",
"resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-1.23.11.tgz",
@@ -1749,14 +1737,6 @@
"undici-types": "~6.19.2"
}
},
- "node_modules/@types/prop-types": {
- "version": "15.7.14",
- "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz",
- "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==",
- "license": "MIT",
- "optional": true,
- "peer": true
- },
"node_modules/@types/react": {
"version": "19.0.8",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.8.tgz",
@@ -2044,484 +2024,19 @@
}
},
"node_modules/cmdk": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/cmdk/-/cmdk-1.0.0.tgz",
- "integrity": "sha512-gDzVf0a09TvoJ5jnuPvygTB77+XdOSwEmJ88L6XPFPlv7T3RxbP9jgenfylrAMD0+Le1aO0nVjQUzl2g+vjz5Q==",
- "license": "MIT",
- "dependencies": {
- "@radix-ui/react-dialog": "1.0.5",
- "@radix-ui/react-primitive": "1.0.3"
- },
- "peerDependencies": {
- "react": "^18.0.0",
- "react-dom": "^18.0.0"
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/primitive": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz",
- "integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz",
- "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "1.0.1",
- "@radix-ui/react-compose-refs": "1.0.1",
- "@radix-ui/react-context": "1.0.1",
- "@radix-ui/react-dismissable-layer": "1.0.5",
- "@radix-ui/react-focus-guards": "1.0.1",
- "@radix-ui/react-focus-scope": "1.0.4",
- "@radix-ui/react-id": "1.0.1",
- "@radix-ui/react-portal": "1.0.4",
- "@radix-ui/react-presence": "1.0.1",
- "@radix-ui/react-primitive": "1.0.3",
- "@radix-ui/react-slot": "1.0.2",
- "@radix-ui/react-use-controllable-state": "1.0.1",
- "aria-hidden": "^1.1.1",
- "react-remove-scroll": "2.5.5"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz",
- "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz",
- "integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz",
- "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "1.0.1",
- "@radix-ui/react-compose-refs": "1.0.1",
- "@radix-ui/react-primitive": "1.0.3",
- "@radix-ui/react-use-callback-ref": "1.0.1",
- "@radix-ui/react-use-escape-keydown": "1.0.3"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
- "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz",
- "integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "1.0.1"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz",
- "integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope": {
"version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz",
- "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.1",
- "@radix-ui/react-primitive": "1.0.3",
- "@radix-ui/react-use-callback-ref": "1.0.1"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
- "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz",
- "integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==",
+ "resolved": "https://registry.npmjs.org/cmdk/-/cmdk-1.0.4.tgz",
+ "integrity": "sha512-AnsjfHyHpQ/EFeAnG216WY7A5LiYCoZzCSygiLvfXC3H3LFGCprErteUcszaVluGOhuOTbJS3jWHrSDYPBBygg==",
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "1.0.1"
+ "@radix-ui/react-dialog": "^1.1.2",
+ "@radix-ui/react-id": "^1.1.0",
+ "@radix-ui/react-primitive": "^2.0.0",
+ "use-sync-external-store": "^1.2.2"
},
"peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz",
- "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz",
- "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.3"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz",
- "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.1",
- "@radix-ui/react-use-layout-effect": "1.0.1"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz",
- "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
- "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.1"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz",
- "integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "1.0.1"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
- "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll": {
- "version": "2.5.5",
- "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz",
- "integrity": "sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==",
- "license": "MIT",
- "dependencies": {
- "react-remove-scroll-bar": "^2.3.3",
- "react-style-singleton": "^2.2.1",
- "tslib": "^2.1.0",
- "use-callback-ref": "^1.3.0",
- "use-sidecar": "^1.1.2"
- },
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-primitive": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz",
- "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "1.0.2"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
- "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.1"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz",
- "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/cmdk/node_modules/@types/react": {
- "version": "18.3.18",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.18.tgz",
- "integrity": "sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==",
- "license": "MIT",
- "optional": true,
- "peer": true,
- "dependencies": {
- "@types/prop-types": "*",
- "csstype": "^3.0.2"
+ "react": "^18 || ^19 || ^19.0.0-rc",
+ "react-dom": "^18 || ^19 || ^19.0.0-rc"
}
},
"node_modules/color": {
@@ -3844,12 +3359,6 @@
"node": ">=8.10.0"
}
},
- "node_modules/regenerator-runtime": {
- "version": "0.14.1",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
- "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
- "license": "MIT"
- },
"node_modules/resolve": {
"version": "1.22.10",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
diff --git a/package.json b/package.json
index a15a00b..ea635ce 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
- "cmdk": "^1.0.0",
+ "cmdk": "^1.0.4",
"init": "^0.1.2",
"lucide-react": "^0.474.0",
"next": "15.1.6",
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 04c3e56..07ba9f2 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -23,7 +23,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
- const categories = await db.category.find
+ // const categories = await db.category.find
const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
const totalFields = requiredFields.length;
From ef49ef2888a14887933dc01d05304b11acc53fbc Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 15:28:22 +0600
Subject: [PATCH 178/706] fixed ui components
---
src/components/ui/combobox.tsx | 39 ++++++++++++++++++----------------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 0f50c66..d92077f 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -1,8 +1,8 @@
-import * as React from "react"
-import { Check, ChevronsUpDown } from "lucide-react"
+import * as React from "react";
+import { Check, ChevronsUpDown } from "lucide-react";
-import { cn } from "@/lib/utils"
-import { Button } from "@/components/ui/button"
+import { cn } from "@/lib/utils";
+import { Button } from "@/components/ui/button";
import {
Command,
CommandEmpty,
@@ -10,21 +10,22 @@ import {
CommandInput,
CommandItem,
CommandList,
-} from "@/components/ui/command"
+} from "@/components/ui/command";
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@/components/ui/popover"
-interface ComboboxProps{
- options:{label:string; value:string}[]
- value?:string;
- onChange?:(value:string) => void;
+} from "@/components/ui/popover";
+
+interface ComboboxProps {
+ options: { label: string; value: string }[];
+ value?: string;
+ onChange?: (value: string) => void;
}
-export const ComboboxDemo = ({
- options,
- value,onChange}: ComboboxProps) =>{
- const [open, setOpen] = React.useState(false)
+
+export const ComboboxDemo = ({ options, value, onChange }: ComboboxProps) => {
+ const [open, setOpen] = React.useState(false);
+
return (
@@ -50,8 +51,10 @@ export const ComboboxDemo = ({
{
- onChange(option.value === value ? "" : option.value)
- setOpen(false)
+ if (onChange) {
+ onChange(option.value === value ? "" : option.value);
+ }
+ setOpen(false);
}}
>
- )
-}
+ );
+};
From 842d5ff5e58b277abfb502ea103fc3069cb6cc58 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 15:30:30 +0600
Subject: [PATCH 179/706] server log
---
.../(routes)/teacher/courses/[courseId]/page.tsx | 6 +++++-
1 file changed, 5 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 07ba9f2..12db552 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -23,7 +23,11 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
- // const categories = await db.category.find
+ const categories = await db.category.findMany({
+ orderBy:{
+ name: 'asc',
+ }
+ })
const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
const totalFields = requiredFields.length;
From 7561875c33c12b50e769a925d41f5c01db58ab1d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 15:30:55 +0600
Subject: [PATCH 180/706] server log
---
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 3 +++
1 file changed, 3 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 12db552..d44a37c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -28,6 +28,9 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
name: 'asc',
}
})
+ if(!course){
+ return redirect("/");
+ }
const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
const totalFields = requiredFields.length;
From d1cf6cca0d2a617dde95fb28714941d2c83fc407 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 15:32:30 +0600
Subject: [PATCH 181/706] script customizw
---
script/seed.ts | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 script/seed.ts
diff --git a/script/seed.ts b/script/seed.ts
new file mode 100644
index 0000000..e69de29
From 07fde423644d8ab33e841780e6dd03f79b53ce34 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 15:33:31 +0600
Subject: [PATCH 182/706] script customizw
---
script/seed.ts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/script/seed.ts b/script/seed.ts
index e69de29..af5460d 100644
--- a/script/seed.ts
+++ b/script/seed.ts
@@ -0,0 +1,5 @@
+
+import {PrismaClient} = require("@prisma/client");
+const db = new PrismaClient()
+
+async function main() {}
\ No newline at end of file
From 0187eda860dadf1b7b77189bb9e13aa5ece01d44 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 15:33:43 +0600
Subject: [PATCH 183/706] script customizw
---
script/seed.ts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/script/seed.ts b/script/seed.ts
index af5460d..824c815 100644
--- a/script/seed.ts
+++ b/script/seed.ts
@@ -2,4 +2,10 @@
import {PrismaClient} = require("@prisma/client");
const db = new PrismaClient()
-async function main() {}
\ No newline at end of file
+async function main() {
+ try {
+
+ }catch (error) {
+ console.log(error)
+ }
+}
\ No newline at end of file
From 26466c1f5daa935950e0655ff839d4e4849f7a3b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 15:48:45 +0600
Subject: [PATCH 184/706] script customizw
---
prisma/schema.prisma | 2 +-
script/seed.ts | 25 ++++++++++++++++++-------
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 78d0260..cc4d4ab 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -9,7 +9,7 @@ datasource db {
model Category {
id String @id @default(cuid())
- userId String
+ userId String?
name String @unique
course Course[]
}
diff --git a/script/seed.ts b/script/seed.ts
index 824c815..a8e1bc7 100644
--- a/script/seed.ts
+++ b/script/seed.ts
@@ -1,11 +1,22 @@
-
-import {PrismaClient} = require("@prisma/client");
-const db = new PrismaClient()
+import { PrismaClient } from "@prisma/client";
+const database = new PrismaClient();
async function main() {
try {
-
- }catch (error) {
- console.log(error)
+ await database.category.createMany({
+ data: [
+ { name: "IT" },
+ { name: "Islam" }, // Запятая после этой строки
+ { name: "Software Engineering" },
+ { name: "Engineering" },
+ { name: "Robot Technik" },
+ { name: "Technologies" },
+ ],
+ });
+ console.log('Successfully created the database');
+ } catch (error) {
+ console.log('Error seeding the database categories', error);
+ } finally {
+ await database.$disconnect(); // Исправлено
}
-}
\ No newline at end of file
+}
From c026258b4b9f34f1bec04e1b457840b3e45e6479 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 16:00:49 +0600
Subject: [PATCH 185/706] bug on seed ts
---
prisma/schema.prisma | 15 +++++++--------
script/seed.ts | 5 +++--
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index cc4d4ab..84bf481 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -7,16 +7,9 @@ datasource db {
url = env("DATABASE_URL")
}
-model Category {
- id String @id @default(cuid())
- userId String?
- name String @unique
- course Course[]
-}
-
model Course {
id String @id @default(cuid())
- userId String
+ userId String?
title String? @db.Text
description String? @db.Text
imageUrl String? @db.Text
@@ -31,6 +24,12 @@ model Course {
@@map("courses")
}
+model Category {
+ id String @id @default(cuid())
+ name String @unique
+ course Course[]
+}
+
model Attachment {
id String @id @default(cuid())
url String @db.Text
diff --git a/script/seed.ts b/script/seed.ts
index a8e1bc7..af81ab9 100644
--- a/script/seed.ts
+++ b/script/seed.ts
@@ -6,7 +6,7 @@ async function main() {
await database.category.createMany({
data: [
{ name: "IT" },
- { name: "Islam" }, // Запятая после этой строки
+ { name: "Islam" },
{ name: "Software Engineering" },
{ name: "Engineering" },
{ name: "Robot Technik" },
@@ -17,6 +17,7 @@ async function main() {
} catch (error) {
console.log('Error seeding the database categories', error);
} finally {
- await database.$disconnect(); // Исправлено
+ await database.$disconnect();
}
}
+main();
\ No newline at end of file
From 0d6bce43d413f68131c25b4ee2e41861febdbe84 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 16:05:52 +0600
Subject: [PATCH 186/706] new category form
---
prisma/schema.prisma | 2 +-
.../[courseId]/components/CategoryForm.tsx | 95 +++++++++++++++++++
.../teacher/courses/[courseId]/page.tsx | 1 +
3 files changed, 97 insertions(+), 1 deletion(-)
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 84bf481..7347803 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -9,7 +9,7 @@ datasource db {
model Course {
id String @id @default(cuid())
- userId String?
+ userId String
title String? @db.Text
description String? @db.Text
imageUrl String? @db.Text
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
new file mode 100644
index 0000000..c1a2c75
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
@@ -0,0 +1,95 @@
+"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";
+import { Textarea } from "@/components/ui/textarea";
+import { cn } from "@/lib/utils";
+
+const formSchema = z.object({
+ description: z.string().min(1, "Description is required"),
+});
+
+interface DescriptionFormProps {
+ initialData: {
+ description: string;
+ };
+ courseId: string;
+}
+
+export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => {
+ const [isEditing, setIsEditing] = useState(false);
+ const router = useRouter(); // ✅ Используем useRouter()
+
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ description: initialData?.description ?? ""
+ },
+ });
+
+ const { isSubmitting, isDirty } = form.formState;
+ 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 Description
+
+ {isEditing ? <>Cancel> : <> Edit Description>}
+
+
+
+ {
+ !isEditing && (
+
+ {initialData.description || 'No description'}
+
+ )}
+ {isEditing && (
+
+
+ (
+
+
+
+
+
+
+ )}
+ />
+
+
+ Save
+
+
+
+
+ )}
+
+ );
+};
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 d44a37c..d6e5a6a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -28,6 +28,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
name: 'asc',
}
})
+ console.log(categories)
if(!course){
return redirect("/");
}
From 0bf8a7b6dcebc23d1b758a1c6e0cf3e67fe2d72a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 16:12:24 +0600
Subject: [PATCH 187/706] customize setup category
---
.../[courseId]/components/CategoryForm.tsx | 28 ++++++++++---------
.../teacher/courses/[courseId]/page.tsx | 5 ++++
2 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
index c1a2c75..b34b224 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
@@ -13,25 +13,27 @@ import { useRouter } from "next/navigation";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
-const formSchema = z.object({
- description: z.string().min(1, "Description is required"),
-});
-interface DescriptionFormProps {
+interface CategoryFormProps {
initialData: {
description: string;
- };
courseId: string;
+ options: {label: string; value: string}[]
+ };
}
-export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => {
+const formSchema = z.object({
+ categoryId: z.string().min(1),
+});
+
+export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProps) => {
const [isEditing, setIsEditing] = useState(false);
- const router = useRouter(); // ✅ Используем useRouter()
+ const router = useRouter();
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- description: initialData?.description ?? ""
+ categoryId: initialData?.categoryId ?? ""
},
});
@@ -43,7 +45,7 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
await axios.patch(`/api/courses/${courseId}`, values);
toast.success("Course updated!");
toggleEdit();
- router.refresh(); // ✅ Теперь работает
+ router.refresh();
} catch (error) {
console.error("Ошибка при обновлении курса:", error);
}
@@ -52,7 +54,7 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
return (
- Course Description
+ Course Des cription
{isEditing ? <>Cancel> : <> Edit Description>}
@@ -62,9 +64,9 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
!isEditing && (
- {initialData.description || 'No description'}
+ {initialData.categoryId || 'No description'}
)}
{isEditing && (
@@ -72,7 +74,7 @@ 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 d6e5a6a..c33fec9 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -6,6 +6,7 @@ import { LayoutDashboard } from "lucide-react";
import { TitleForm } from "./components/TitleForm";
import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm";
import {ImageForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
+import {CategoryForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm";
const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => {
const { userId } = await auth();
@@ -66,6 +67,10 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
/> ({}))}
/>
From 11efb019cea114a51340ba880b029a7aaa79829d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 16:20:32 +0600
Subject: [PATCH 188/706] fixed category Form
---
.../courses/[courseId]/components/CategoryForm.tsx | 9 ++++-----
.../(routes)/teacher/courses/[courseId]/page.tsx | 5 ++++-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
index b34b224..1dc003d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
@@ -12,14 +12,13 @@ import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
+import {Course} from "@prisma/client";
interface CategoryFormProps {
- initialData: {
- description: string;
+ initialData: Course;
+ options: {label: string; value: string}[];
courseId: string;
- options: {label: string; value: string}[]
- };
}
const formSchema = z.object({
@@ -74,7 +73,7 @@ export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProp
(
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 c33fec9..eaa2bf5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -70,7 +70,10 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
/> ({}))}
+ options={categories.map((category) => ({
+ label: category.name,
+ value: category.id,
+ }))}
/>
From 3f5f58f6a6b9ffbe7759aa9978222ec15892f4ac Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 16:24:39 +0600
Subject: [PATCH 189/706] fixed category Form
---
.../teacher/courses/[courseId]/components/CategoryForm.tsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
index 1dc003d..0961072 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
@@ -50,6 +50,8 @@ export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProp
}
};
+ const selectedOption = options.find(option => option.value === initialData.categoryId);
+
return (
@@ -63,9 +65,9 @@ export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProp
!isEditing && (
- {initialData.categoryId || 'No description'}
+ {selectedOption?.label || 'No Category'}
)}
{isEditing && (
From eeebca391468d69b4285fdf95b987ace2996bef6 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 16:29:30 +0600
Subject: [PATCH 190/706] fixing ui shadcn on category form
---
.../[courseId]/components/CategoryForm.tsx | 37 +++++++++----------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
index 0961072..d8593f5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
@@ -7,17 +7,17 @@ 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 { Textarea } from "@/components/ui/textarea";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
-import { Textarea } from "@/components/ui/textarea";
-import { cn } from "@/lib/utils";
+import { ComboboxDemo } from "@/components/ui/combobox";
import {Course} from "@prisma/client";
+import {cn} from "@/lib/utils"; // Предполагаем, что это твой компонент Combobox
interface CategoryFormProps {
- initialData: Course;
- options: {label: string; value: string}[];
+ initialData: Course;
+ options: { label: string; value: string }[];
courseId: string;
}
@@ -25,14 +25,14 @@ const formSchema = z.object({
categoryId: z.string().min(1),
});
-export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProps) => {
+export const CategoryForm = ({ initialData, courseId, options }: CategoryFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- categoryId: initialData?.categoryId ?? ""
+ categoryId: initialData?.categoryId ?? "",
},
});
@@ -50,26 +50,25 @@ export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProp
}
};
- const selectedOption = options.find(option => option.value === initialData.categoryId);
+ const selectedOption = options.find((option) => option.value === initialData.categoryId);
return (
- Course Des cription
+ Course Description
{isEditing ? <>Cancel> : <> Edit Description>}
- {
- !isEditing && (
-
- {selectedOption?.label || 'No Category'}
-
- )}
+ {!isEditing && (
+
+ {selectedOption?.label || "No Category"}
+
+ )}
+
{isEditing && (
@@ -79,7 +78,7 @@ export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProp
render={({ field }) => (
-
+
From e334a052db33568e9a6021f134e5f5e2b7b1b4c9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 16:34:34 +0600
Subject: [PATCH 191/706] having some bug on combobox ui customize after 19:30
ok
---
.../[courseId]/components/CategoryForm.tsx | 38 ++++++++++---------
src/components/ui/combobox.tsx | 7 ++--
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
index d8593f5..6974a92 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
@@ -7,17 +7,18 @@ 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 { Textarea } from "@/components/ui/textarea";
+import { Input } from "@/components/ui/input";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
-import { ComboboxDemo } from "@/components/ui/combobox";
+import { Textarea } from "@/components/ui/textarea";
+import { cn } from "@/lib/utils";
import {Course} from "@prisma/client";
-import {cn} from "@/lib/utils"; // Предполагаем, что это твой компонент Combobox
+import {ComboboxDemo} from "@/components/ui/combobox";
interface CategoryFormProps {
- initialData: Course;
- options: { label: string; value: string }[];
+ initialData: Course;
+ options: {label: string; value: string}[];
courseId: string;
}
@@ -25,14 +26,14 @@ const formSchema = z.object({
categoryId: z.string().min(1),
});
-export const CategoryForm = ({ initialData, courseId, options }: CategoryFormProps) => {
+export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- categoryId: initialData?.categoryId ?? "",
+ categoryId: initialData?.categoryId ?? ""
},
});
@@ -50,25 +51,26 @@ export const CategoryForm = ({ initialData, courseId, options }: CategoryFormPro
}
};
- const selectedOption = options.find((option) => option.value === initialData.categoryId);
+ const selectedOption = options.find(option => option.value === initialData.categoryId);
return (
- Course Description
+ Course Des cription
{isEditing ? <>Cancel> : <> Edit Description>}
- {!isEditing && (
-
- {selectedOption?.label || "No Category"}
-
- )}
-
+ {
+ !isEditing && (
+
+ {selectedOption?.label || 'No Category'}
+
+ )}
{isEditing && (
@@ -78,7 +80,7 @@ export const CategoryForm = ({ initialData, courseId, options }: CategoryFormPro
render={({ field }) => (
-
+
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index d92077f..e74129b 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -26,6 +26,8 @@ interface ComboboxProps {
export const ComboboxDemo = ({ options, value, onChange }: ComboboxProps) => {
const [open, setOpen] = React.useState(false);
+ const selectedOption = options.find((option) => option.value === value);
+
return (
@@ -35,9 +37,7 @@ export const ComboboxDemo = ({ options, value, onChange }: ComboboxProps) => {
aria-expanded={open}
className="w-[200px] justify-between"
>
- {value
- ? options.find((option) => option.value === value)?.label
- : "Select option..."}
+ {selectedOption ? selectedOption.label : "Select option..."}
@@ -52,6 +52,7 @@ export const ComboboxDemo = ({ options, value, onChange }: ComboboxProps) => {
key={option.value}
onSelect={() => {
if (onChange) {
+ // Обрабатываем выбор новой опции
onChange(option.value === value ? "" : option.value);
}
setOpen(false);
From 9605b9790d30e4656ff9510d9d4b262a5534b6bd Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 19:20:31 +0600
Subject: [PATCH 192/706] combobox adding
---
src/components/ui/combobox.tsx | 52 ++++++++++++++++------------------
1 file changed, 24 insertions(+), 28 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index e74129b..7b3072a 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -1,8 +1,10 @@
-import * as React from "react";
-import { Check, ChevronsUpDown } from "lucide-react";
+"use client"
-import { cn } from "@/lib/utils";
-import { Button } from "@/components/ui/button";
+import * as React from "react"
+import { Check, ChevronsUpDown } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+import { Button } from "@/components/ui/button"
import {
Command,
CommandEmpty,
@@ -10,23 +12,17 @@ import {
CommandInput,
CommandItem,
CommandList,
-} from "@/components/ui/command";
+} from "@/components/ui/command"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@/components/ui/popover";
-
-interface ComboboxProps {
- options: { label: string; value: string }[];
- value?: string;
- onChange?: (value: string) => void;
-}
+} from "@/components/ui/popover"
-export const ComboboxDemo = ({ options, value, onChange }: ComboboxProps) => {
- const [open, setOpen] = React.useState(false);
- const selectedOption = options.find((option) => option.value === value);
+export function ComboboxDemo() {
+ const [open, setOpen] = React.useState(false)
+ const [value, setValue] = React.useState("")
return (
@@ -37,7 +33,9 @@ export const ComboboxDemo = ({ options, value, onChange }: ComboboxProps) => {
aria-expanded={open}
className="w-[200px] justify-between"
>
- {selectedOption ? selectedOption.label : "Select option..."}
+ {value
+ ? frameworks.find((framework) => framework.value === value)?.label
+ : "Select framework..."}
@@ -47,24 +45,22 @@ export const ComboboxDemo = ({ options, value, onChange }: ComboboxProps) => {
No framework found.
- {options.map((option) => (
+ {frameworks.map((framework) => (
{
- if (onChange) {
- // Обрабатываем выбор новой опции
- onChange(option.value === value ? "" : option.value);
- }
- setOpen(false);
+ key={framework.value}
+ value={framework.value}
+ onSelect={(currentValue) => {
+ setValue(currentValue === value ? "" : currentValue)
+ setOpen(false)
}}
>
- {option.label}
+ {framework.label}
))}
@@ -72,5 +68,5 @@ export const ComboboxDemo = ({ options, value, onChange }: ComboboxProps) => {
- );
-};
+ )
+}
From b7d2c06205150cff99b4ebfc2771db595bcba899 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 19:25:19 +0600
Subject: [PATCH 193/706] combobox adding
---
src/components/ui/combobox.tsx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 7b3072a..1af4b74 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -19,10 +19,15 @@ import {
PopoverTrigger,
} from "@/components/ui/popover"
-
-export function ComboboxDemo() {
+interface ComboboxProps {
+ options:{label:string; value:string}[];
+ value?:string;
+ onChange:(value:string) => void;
+}
+export const ComboboxDemo =({
+ options,value,onChange,
+ }: ComboboxProps) => {
const [open, setOpen] = React.useState(false)
- const [value, setValue] = React.useState("")
return (
From f485fc93fd4734c48b2f90ebd7a3b5566493b19f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 19:26:17 +0600
Subject: [PATCH 194/706] combobox adding
---
src/components/ui/combobox.tsx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 1af4b74..b454547 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -39,18 +39,18 @@ export const ComboboxDemo =({
className="w-[200px] justify-between"
>
{value
- ? frameworks.find((framework) => framework.value === value)?.label
- : "Select framework..."}
+ ? options.find((option) => options.value === value)?.label
+ : "Select option..."}
-
+
- No framework found.
+ No Option found.
- {frameworks.map((framework) => (
+ {options.map((framework) => (
Date: Mon, 10 Feb 2025 19:27:48 +0600
Subject: [PATCH 195/706] combobox adding
---
src/components/ui/combobox.tsx | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index b454547..928ac46 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -50,12 +50,11 @@ export const ComboboxDemo =({
No Option found.
- {options.map((framework) => (
+ {options.map((option) => (
{
- setValue(currentValue === value ? "" : currentValue)
+ onChange(option.value === value ? "" : option.value)
setOpen(false)
}}
>
From b94a73ae82810c43d92a0247519c158542375fa9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 19:28:55 +0600
Subject: [PATCH 196/706] combobox adding
---
src/components/ui/combobox.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 928ac46..95f7567 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -39,7 +39,7 @@ export const ComboboxDemo =({
className="w-[200px] justify-between"
>
{value
- ? options.find((option) => options.value === value)?.label
+ ? options.find((option) => option.value === value)?.label
: "Select option..."}
@@ -61,10 +61,10 @@ export const ComboboxDemo =({
- {framework.label}
+ {option.label}
))}
From da6fe133abdb24c022c76bc99f45e403137a7cea Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 19:42:20 +0600
Subject: [PATCH 197/706] customize category page
---
.../[courseId]/components/CategoryForm.tsx | 36 ++++++++-----------
src/components/ui/combobox.tsx | 2 +-
2 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
index 6974a92..60102a5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm.tsx
@@ -7,18 +7,15 @@ 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";
-import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
-import {Course} from "@prisma/client";
-import {ComboboxDemo} from "@/components/ui/combobox";
-
+import { Course } from "@prisma/client";
+import { Combobox } from "@/components/ui/combobox";
interface CategoryFormProps {
- initialData: Course;
- options: {label: string; value: string}[];
+ initialData: Course;
+ options: { label: string; value: string }[];
courseId: string;
}
@@ -26,14 +23,14 @@ const formSchema = z.object({
categoryId: z.string().min(1),
});
-export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProps) => {
+export const CategoryForm = ({ initialData, courseId, options }: CategoryFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- categoryId: initialData?.categoryId ?? ""
+ categoryId: initialData?.categoryId ?? "",
},
});
@@ -51,26 +48,23 @@ export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProp
}
};
- const selectedOption = options.find(option => option.value === initialData.categoryId);
+ const selectedOption = options.find((option) => option.value === initialData.categoryId);
return (
- Course Des cription
+ Course Category
{isEditing ? <>Cancel> : <> Edit Description>}
- {
- !isEditing && (
-
- {selectedOption?.label || 'No Category'}
-
- )}
+ {!isEditing && (
+
+ {selectedOption?.label || 'No Category'}
+
+ )}
+
{isEditing && (
@@ -80,7 +74,7 @@ export const CategoryForm = ({ initialData, courseId,options }: CategoryFormProp
render={({ field }) => (
-
+
diff --git a/src/components/ui/combobox.tsx b/src/components/ui/combobox.tsx
index 95f7567..d139b81 100644
--- a/src/components/ui/combobox.tsx
+++ b/src/components/ui/combobox.tsx
@@ -24,7 +24,7 @@ interface ComboboxProps {
value?:string;
onChange:(value:string) => void;
}
-export const ComboboxDemo =({
+export const Combobox =({
options,value,onChange,
}: ComboboxProps) => {
const [open, setOpen] = React.useState(false)
From 904a77dabcaf9a39f84e365875af04ad444a0d73 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 20:16:43 +0600
Subject: [PATCH 198/706] finished category page
---
script/seed.ts | 4 ++--
.../courses/[courseId]/components/TitleForm.tsx | 11 +++++------
.../(routes)/teacher/courses/[courseId]/page.tsx | 11 ++++++-----
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/script/seed.ts b/script/seed.ts
index af81ab9..96a389c 100644
--- a/script/seed.ts
+++ b/script/seed.ts
@@ -1,4 +1,4 @@
-import { PrismaClient } from "@prisma/client";
+const { PrismaClient } = require("@prisma/client");
const database = new PrismaClient();
async function main() {
@@ -13,7 +13,7 @@ async function main() {
{ name: "Technologies" },
],
});
- console.log('Successfully created the database');
+ console.log('Successfully created the database',);
} catch (error) {
console.log('Error seeding the database categories', error);
} finally {
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 7a892cc..388bedc 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
@@ -9,7 +9,7 @@ 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"; // ✅ Правильный импорт
+import { useRouter } from "next/navigation";
const formSchema = z.object({
title: z.string().min(1, "Title is required"),
@@ -24,16 +24,15 @@ interface TitleFormProps {
export const TitleForm = ({ initialData, courseId }: TitleFormProps) => {
const [isEditing, setIsEditing] = useState(false);
- const router = useRouter(); // ✅ Используем useRouter()
-
+ const router = useRouter();
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) => {
@@ -41,7 +40,7 @@ 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);
}
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 eaa2bf5..91c2aff 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -20,10 +20,6 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
},
});
- if (!course) {
- return redirect("/");
- }
-
const categories = await db.category.findMany({
orderBy:{
name: 'asc',
@@ -34,7 +30,12 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
- const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
+ 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})`;
From f3af371f16b41e7693bf7f98308048d45f8139f5 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 20:28:02 +0600
Subject: [PATCH 199/706] something bug an image but now it s okay
---
next.config.ts | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/next.config.ts b/next.config.ts
index 7fbb66d..1e4296d 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -1,11 +1,15 @@
-import type { NextConfig } from "next";
-
-const nextConfig: NextConfig = {
-images:{
- domains:[
- 'utfs.io'
- ]
-}
+/** @type {import('next').NextConfig} */
+const nextConfig = {
+ images: {
+ domains: ['utfs.io'], // Разрешаем загрузку изображений с utfs.io
+ remotePatterns: [
+ {
+ protocol: 'https',
+ hostname: 'utfs.io',
+ pathname: '/f/**',
+ },
+ ],
+ },
};
-export default nextConfig;
+module.exports = nextConfig;
From 0f994006e21c58889ef14a35eb00c407f237ab9d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 20:38:46 +0600
Subject: [PATCH 200/706] customize a next feature
---
next.config.ts | 2 +-
.../teacher/courses/[courseId]/page.tsx | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/next.config.ts b/next.config.ts
index 1e4296d..ad60ea5 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
- domains: ['utfs.io'], // Разрешаем загрузку изображений с utfs.io
+ domains: ['utfs.io'],
remotePatterns: [
{
protocol: 'https',
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 91c2aff..d959d34 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -2,7 +2,7 @@ import { db } from "@/lib/db";
import { auth } from "@clerk/nextjs/server";
import { redirect } from "next/navigation";
import { IconBadge } from "@/components/icon-badge";
-import { LayoutDashboard } from "lucide-react";
+import {LayoutDashboard, ListChecks} from "lucide-react";
import { TitleForm } from "./components/TitleForm";
import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm";
import {ImageForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
@@ -77,6 +77,21 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
}))}
/>
+
+
+
+
+
+
+ Course chapters
+
+
+
+
+
+
+
+
);
From c19f07be3fe39394b0b0497dc47330a90b2c6047 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:20:23 +0600
Subject: [PATCH 201/706] customize a next feature
---
.../[courseId]/components/PriceForm.tsx | 95 +++++++++++++++++++
.../teacher/courses/[courseId]/page.tsx | 72 +++++---------
2 files changed, 121 insertions(+), 46 deletions(-)
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
new file mode 100644
index 0000000..c1a2c75
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -0,0 +1,95 @@
+"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";
+import { Textarea } from "@/components/ui/textarea";
+import { cn } from "@/lib/utils";
+
+const formSchema = z.object({
+ description: z.string().min(1, "Description is required"),
+});
+
+interface DescriptionFormProps {
+ initialData: {
+ description: string;
+ };
+ courseId: string;
+}
+
+export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => {
+ const [isEditing, setIsEditing] = useState(false);
+ const router = useRouter(); // ✅ Используем useRouter()
+
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ description: initialData?.description ?? ""
+ },
+ });
+
+ const { isSubmitting, isDirty } = form.formState;
+ 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 Description
+
+ {isEditing ? <>Cancel> : <> Edit Description>}
+
+
+
+ {
+ !isEditing && (
+
+ {initialData.description || 'No description'}
+
+ )}
+ {isEditing && (
+
+
+ (
+
+
+
+
+
+
+ )}
+ />
+
+
+ Save
+
+
+
+
+ )}
+
+ );
+};
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 d959d34..4a5cbc6 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -2,11 +2,11 @@ import { db } from "@/lib/db";
import { auth } from "@clerk/nextjs/server";
import { redirect } from "next/navigation";
import { IconBadge } from "@/components/icon-badge";
-import {LayoutDashboard, ListChecks} from "lucide-react";
+import { CircleDollarSign, LayoutDashboard, ListChecks } from "lucide-react";
import { TitleForm } from "./components/TitleForm";
import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm";
-import {ImageForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
-import {CategoryForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm";
+import { ImageForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
+import { CategoryForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm";
const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => {
const { userId } = await auth();
@@ -15,27 +15,16 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
}
const course = await db.course.findUnique({
- where: {
- id: params.courseId,
- },
+ where: { id: params.courseId },
});
- const categories = await db.category.findMany({
- orderBy:{
- name: 'asc',
- }
- })
- console.log(categories)
- if(!course){
+ const categories = await db.category.findMany({ orderBy: { name: "asc" } });
+
+ if (!course) {
return redirect("/");
}
- const requiredFields = [
- course.title,
- course.description,
- course.imageUrl,
- course.price,
- course.categoryId];
+ 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})`;
@@ -48,27 +37,18 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
Completed fields {completionText}
+
Customize your course
-
-
+
+
+
({
@@ -77,21 +57,21 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
}))}
/>
-
+
+
+
+
+
Course chapters
+
+
TODO: Chapters
+
-
-
-
- Course chapters
-
-
-
-
-
+
+
+
Sell your course
+
-
-
);
From 38201436df0c1722dad8b16a2edcdb488edfea7d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:30:46 +0600
Subject: [PATCH 202/706] customize a next feature
---
.../teacher/courses/[courseId]/components/PriceForm.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index c1a2c75..932dc38 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -19,19 +19,19 @@ const formSchema = z.object({
interface DescriptionFormProps {
initialData: {
- description: string;
+ price: string;
};
courseId: string;
}
export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => {
const [isEditing, setIsEditing] = useState(false);
- const router = useRouter(); // ✅ Используем useRouter()
+ const router = useRouter();
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- description: initialData?.description ?? ""
+ price: initialData?.price ?? ""
},
});
From 163722d4077105e4f19aec9fb455f3dd163b2587 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:32:07 +0600
Subject: [PATCH 203/706] price form adding
---
.../[courseId]/components/PriceForm.tsx | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index 932dc38..8f57e51 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -14,17 +14,16 @@ import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
const formSchema = z.object({
- description: z.string().min(1, "Description is required"),
+ price: z.string().min(1, "Price is required"),
});
-
-interface DescriptionFormProps {
+interface PriceForm {
initialData: {
price: string;
};
courseId: string;
}
-export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => {
+export const PriceForm = ({ initialData, courseId }: PriceForm) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
@@ -52,9 +51,9 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
return (
- Course Description
+ Course Price
- {isEditing ? <>Cancel> : <> Edit Description>}
+ {isEditing ? <>Cancel> : <> Edit Price>}
@@ -62,9 +61,9 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
!isEditing && (
- {initialData.description || 'No description'}
+ {initialData.price || 'No price'}
)}
{isEditing && (
@@ -72,11 +71,11 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
(
-
+
From b83c34763c0b7da02465e241a41c4b9c1211229a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:34:34 +0600
Subject: [PATCH 204/706] price form adding
---
.../courses/[courseId]/components/PriceForm.tsx | 15 +++++++--------
.../(routes)/teacher/courses/[courseId]/page.tsx | 3 +++
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index 8f57e51..fc1a04c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -12,14 +12,13 @@ import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
+import {Course} from "@prisma/client";
const formSchema = z.object({
- price: z.string().min(1, "Price is required"),
+ description: z.string().min(1, "Price is required"),
});
interface PriceForm {
- initialData: {
- price: string;
- };
+ initialData: Course
courseId: string;
}
@@ -30,7 +29,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- price: initialData?.price ?? ""
+ description: initialData?.description ?? ""
},
});
@@ -61,9 +60,9 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
!isEditing && (
- {initialData.price || 'No price'}
+ {initialData.description || 'No description'}
)}
{isEditing && (
@@ -71,7 +70,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
(
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 4a5cbc6..d8c4a3a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -7,6 +7,7 @@ import { TitleForm } from "./components/TitleForm";
import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm";
import { ImageForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
import { CategoryForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm";
+import {PriceForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm";
const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => {
const { userId } = await auth();
@@ -67,10 +68,12 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
TODO: Chapters
+
Sell your course
+
From de6e113da343031160ccb7b4208082d8b17c47b5 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:41:13 +0600
Subject: [PATCH 205/706] price form adding
---
.../[courseId]/components/DescriptionForm.tsx | 9 ++++-----
.../courses/[courseId]/components/PriceForm.tsx | 13 ++++++-------
2 files changed, 10 insertions(+), 12 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 c1a2c75..1e9394b 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,21 +12,20 @@ import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
+import {Course} from "@prisma/client";
const formSchema = z.object({
description: z.string().min(1, "Description is required"),
});
interface DescriptionFormProps {
- initialData: {
- description: string;
- };
+ initialData:Course
courseId: string;
}
export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => {
const [isEditing, setIsEditing] = useState(false);
- const router = useRouter(); // ✅ Используем useRouter()
+ const router = useRouter();
const form = useForm>({
resolver: zodResolver(formSchema),
@@ -43,7 +42,7 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
await axios.patch(`/api/courses/${courseId}`, values);
toast.success("Course updated!");
toggleEdit();
- router.refresh(); // ✅ Теперь работает
+ router.refresh();
} catch (error) {
console.error("Ошибка при обновлении курса:", error);
}
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index fc1a04c..e16f7be 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -15,7 +15,7 @@ import { cn } from "@/lib/utils";
import {Course} from "@prisma/client";
const formSchema = z.object({
- description: z.string().min(1, "Price is required"),
+ price: z.string().min(1, "Price is required"),
});
interface PriceForm {
initialData: Course
@@ -25,11 +25,10 @@ interface PriceForm {
export const PriceForm = ({ initialData, courseId }: PriceForm) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
-
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- description: initialData?.description ?? ""
+ price: initialData?.price || undefined,
},
});
@@ -41,7 +40,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
await axios.patch(`/api/courses/${courseId}`, values);
toast.success("Course updated!");
toggleEdit();
- router.refresh(); // ✅ Теперь работает
+ router.refresh();
} catch (error) {
console.error("Ошибка при обновлении курса:", error);
}
@@ -60,9 +59,9 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
!isEditing && (
- {initialData.description || 'No description'}
+ {initialData.price || 'No price'}
)}
{isEditing && (
@@ -70,7 +69,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
(
From 6abdc76c8fea1a0d8fc11b1bc45d693bc776c9c2 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:44:11 +0600
Subject: [PATCH 206/706] price form adding
---
.../teacher/courses/[courseId]/components/PriceForm.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index e16f7be..7a478c7 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -73,7 +73,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
render={({ field }) => (
-
+
From 41282d55a22f4d3099f86aefd2682348290af036 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:48:56 +0600
Subject: [PATCH 207/706] format for price
---
src/lib/format.ts | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 src/lib/format.ts
diff --git a/src/lib/format.ts b/src/lib/format.ts
new file mode 100644
index 0000000..206669b
--- /dev/null
+++ b/src/lib/format.ts
@@ -0,0 +1,7 @@
+export const formatPrice = (price:number) => {
+return new Intl.NumberFormat('en-US', {
+ style: 'currency',
+})
+};
+
+
From c0453d2ddb62dd605ecaca7705eeb850647f702b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:51:12 +0600
Subject: [PATCH 208/706] format for price
---
.../teacher/courses/[courseId]/components/PriceForm.tsx | 4 ++--
src/lib/format.ts | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index 7a478c7..0ed2149 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -15,7 +15,7 @@ import { cn } from "@/lib/utils";
import {Course} from "@prisma/client";
const formSchema = z.object({
- price: z.string().min(1, "Price is required"),
+ price: z.number().min(1, "Price is required"),
});
interface PriceForm {
initialData: Course
@@ -61,7 +61,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
'text-sm mt-2',
!initialData.price ? 'text-slate-100 italic' : ''
)}>
- {initialData.price || 'No price'}
+ {initialData.price ? format}
)}
{isEditing && (
diff --git a/src/lib/format.ts b/src/lib/format.ts
index 206669b..773c25d 100644
--- a/src/lib/format.ts
+++ b/src/lib/format.ts
@@ -1,7 +1,8 @@
export const formatPrice = (price:number) => {
return new Intl.NumberFormat('en-US', {
style: 'currency',
-})
+ currency: 'USD',
+}).format(price);
};
From 9383e112311dfc66f3320d33b4f74a8b0545c626 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:52:01 +0600
Subject: [PATCH 209/706] price changed
---
.../teacher/courses/[courseId]/components/PriceForm.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index 0ed2149..286733b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -13,6 +13,7 @@ import { useRouter } from "next/navigation";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
import {Course} from "@prisma/client";
+import {formatPrice} from "@/lib/format";
const formSchema = z.object({
price: z.number().min(1, "Price is required"),
@@ -61,7 +62,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
'text-sm mt-2',
!initialData.price ? 'text-slate-100 italic' : ''
)}>
- {initialData.price ? format}
+ {initialData.price ? formatPrice(initialData.price) : 'No Price'}
)}
{isEditing && (
From 779cb8f895af74c9cf636c66f0749a56a8fa9f50 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:55:50 +0600
Subject: [PATCH 210/706] not working no price
---
.../courses/[courseId]/components/PriceForm.tsx | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index 286733b..82069b0 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -12,14 +12,15 @@ import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
-import {Course} from "@prisma/client";
-import {formatPrice} from "@/lib/format";
+import { Course } from "@prisma/client";
+import { formatPrice } from "@/lib/format";
const formSchema = z.object({
price: z.number().min(1, "Price is required"),
});
+
interface PriceForm {
- initialData: Course
+ initialData: Course;
courseId: string;
}
@@ -57,14 +58,17 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
{
+ // Условие для проверки наличия цены и применения стилей
!isEditing && (
- {initialData.price ? formatPrice(initialData.price) : 'No Price'}
+ {initialData.price === null || initialData.price === undefined || initialData.price === 0 ? 'No Price' : formatPrice(initialData.price)}
- )}
+ )
+ }
+
{isEditing && (
From a0f72bf8bb1fc677f4a2de1097efdf227ca40825 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 21:59:50 +0600
Subject: [PATCH 211/706] bug in price form
---
.../courses/[courseId]/components/PriceForm.tsx | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index 82069b0..286733b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -12,15 +12,14 @@ import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
-import { Course } from "@prisma/client";
-import { formatPrice } from "@/lib/format";
+import {Course} from "@prisma/client";
+import {formatPrice} from "@/lib/format";
const formSchema = z.object({
price: z.number().min(1, "Price is required"),
});
-
interface PriceForm {
- initialData: Course;
+ initialData: Course
courseId: string;
}
@@ -58,17 +57,14 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
{
- // Условие для проверки наличия цены и применения стилей
!isEditing && (
- {initialData.price === null || initialData.price === undefined || initialData.price === 0 ? 'No Price' : formatPrice(initialData.price)}
+ {initialData.price ? formatPrice(initialData.price) : 'No Price'}
- )
- }
-
+ )}
{isEditing && (
From 59cef07ce39bfbbc3b833acd3965093d3b15b512 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 22:02:31 +0600
Subject: [PATCH 212/706] fixing price form
---
.../teacher/courses/[courseId]/components/PriceForm.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index 286733b..e9d7840 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -16,7 +16,7 @@ import {Course} from "@prisma/client";
import {formatPrice} from "@/lib/format";
const formSchema = z.object({
- price: z.number().min(1, "Price is required"),
+ price: z.coerce.number(),
});
interface PriceForm {
initialData: Course
From 4aaab1b23b2a029c2565c9a080a40fbcc1052200 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 22:05:35 +0600
Subject: [PATCH 213/706] fixing price form
---
.../courses/[courseId]/components/DescriptionForm.tsx | 2 +-
.../teacher/courses/[courseId]/components/PriceForm.tsx | 5 ++---
2 files changed, 3 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 1e9394b..7d4cf58 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
@@ -30,7 +30,7 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- description: initialData?.description ?? ""
+ description: initialData?.description || ""
},
});
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index e9d7840..35faeae 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -60,8 +60,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
!isEditing && (
+ !initialData.price && 'text-slate-100 italic' )}>
{initialData.price ? formatPrice(initialData.price) : 'No Price'}
)}
@@ -74,7 +73,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
render={({ field }) => (
-
+
From 269e2d8618738be3eacfc2f04a0a7c5a142b1079 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 10 Feb 2025 22:10:18 +0600
Subject: [PATCH 214/706] fixing price form
---
.../(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 d8c4a3a..97c932c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -47,7 +47,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
-
+
Date: Mon, 10 Feb 2025 22:12:41 +0600
Subject: [PATCH 215/706] fixed a price form but now has a problem on controll
components
---
.../teacher/courses/[courseId]/components/PriceForm.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index 35faeae..baaa1e2 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -60,7 +60,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
!isEditing && (
+ !initialData.price && 'text-slate-500 italic' )}>
{initialData.price ? formatPrice(initialData.price) : 'No Price'}
)}
From b8e5d6d10102bc6140ce0f8190f64da81760b132 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 11:56:33 +0600
Subject: [PATCH 216/706] fixed no description
---
.../teacher/courses/[courseId]/components/DescriptionForm.tsx | 2 +-
1 file changed, 1 insertion(+), 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 7d4cf58..6e50b5f 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
@@ -61,7 +61,7 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
!isEditing && (
{initialData.description || 'No description'}
From 6bce88b6cc65257c3eb03badde545b55285dfd59 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 11:58:48 +0600
Subject: [PATCH 217/706] fixed bug on price form
---
.../teacher/courses/[courseId]/components/PriceForm.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index baaa1e2..d71ad19 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -29,7 +29,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- price: initialData?.price || undefined,
+ price: initialData?.price || '',
},
});
From f83d09e7e03f24594b522923994e07a6aa80e162 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 12:07:05 +0600
Subject: [PATCH 218/706] new feature on page in courseId
---
.../courses/[courseId]/components/PriceForm.tsx | 2 +-
.../(routes)/teacher/courses/[courseId]/page.tsx | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
index d71ad19..93d81fe 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm.tsx
@@ -29,7 +29,7 @@ export const PriceForm = ({ initialData, courseId }: PriceForm) => {
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- price: initialData?.price || '',
+ price: initialData?.price || 0,
},
});
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 97c932c..13afac8 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -2,7 +2,7 @@ import { db } from "@/lib/db";
import { auth } from "@clerk/nextjs/server";
import { redirect } from "next/navigation";
import { IconBadge } from "@/components/icon-badge";
-import { CircleDollarSign, LayoutDashboard, ListChecks } from "lucide-react";
+import { CircleDollarSign, LayoutDashboard, ListChecks,File } from "lucide-react";
import { TitleForm } from "./components/TitleForm";
import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm";
import { ImageForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
@@ -41,7 +41,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
-
+
Customize your course
@@ -75,6 +75,12 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
+
+
+
+
Resource Attacment
+
+
);
From 26aec1aed65ed69cf101b760cf904b2a86be5d55 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 14:48:30 +0600
Subject: [PATCH 219/706] new attachemtn form
---
.../[courseId]/components/Attachment.tsx | 91 +++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx
new file mode 100644
index 0000000..5f96f8b
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx
@@ -0,0 +1,91 @@
+"use client";
+import React, { useState } from "react";
+import * as z from "zod";
+import axios from "axios";
+import {ImageIcon, Pencil, PlusCircle} from "lucide-react";
+import { Button } from "@/components/ui/button";
+import toast from "react-hot-toast";
+import { useRouter } from "next/navigation";
+import { Course } from "@prisma/client";
+import Image from "next/image";
+import {FileUpload} from "@/components/file-upload";
+
+const formSchema = z.object({
+ imageUrl: z.string().min(1, {
+ message: "Image is required",
+ }),
+});
+
+interface AttachmentFormProps {
+ initialData: Course;
+ courseId: string;
+}
+
+export const ImageForm = ({ initialData, courseId }: AttachmentFormProps) => {
+ const [isEditing, setIsEditing] = useState(false);
+ const router = useRouter();
+
+
+ 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 Attachment Resourec
+
+ {isEditing ? (
+ <>Cancel>
+ ) : !initialData?.imageUrl ? (
+ <>
+
+ Add an image
+ >
+ ) : (
+ <>
+ Edit Image
+ >
+ )}
+
+
+ {!isEditing && (
+ !initialData.imageUrl ? (
+
+
+
+ ) : (
+
+
+
+
+ )
+ )}
+ {isEditing && (
+
+
{
+ if(url) {
+ onSubmit({imageUrl: url})
+ }
+ }}
+ />
+
+ 16:9 aspect ralio recommended
+
+
+
+
+ )}
+
+ );
+};
From 674808ae2f2c02c44bd7caf74d5ba7d9b1c2dd70 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 14:51:42 +0600
Subject: [PATCH 220/706] new attachemtn form
---
.../teacher/courses/[courseId]/components/Attachment.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx
index 5f96f8b..e68fa37 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx
@@ -44,12 +44,12 @@ export const ImageForm = ({ initialData, courseId }: AttachmentFormProps) => {
Course Attachment Resourec
- {isEditing ? (
+ {isEditing && (
<>Cancel>
- ) : !initialData?.imageUrl ? (
+ )} { !isEditing && !initialData.imageUrl && (
<>
- Add an image
+ Add an File
>
) : (
<>
From de9eb67b588b06297efff92b5aee379352149660 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:09:59 +0600
Subject: [PATCH 221/706] customize setup attachmentform
---
.../components/{Attachment.tsx => AttachmentForm.tsx} | 2 +-
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
rename src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/{Attachment.tsx => AttachmentForm.tsx} (98%)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
similarity index 98%
rename from src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx
rename to src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index e68fa37..f927f7a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/Attachment.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -42,7 +42,7 @@ export const ImageForm = ({ initialData, courseId }: AttachmentFormProps) => {
return (
- Course Attachment Resourec
+ Course Attachment Resources
{isEditing && (
<>Cancel>
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 13afac8..76ac80a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -80,6 +80,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
Resource Attacment
+
From 852aaa4592154aea379f15dda2b61708a52d240f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:10:44 +0600
Subject: [PATCH 222/706] customize setup attachmentform
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 2 +-
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index f927f7a..9a167b3 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -21,7 +21,7 @@ interface AttachmentFormProps {
courseId: string;
}
-export const ImageForm = ({ initialData, courseId }: AttachmentFormProps) => {
+export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
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 76ac80a..0e3d851 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -80,7 +80,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
Resource Attacment
-
+
From ff33cc7a2ed03a26d0d8ce6d4d5cff801a4db9f7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:10:59 +0600
Subject: [PATCH 223/706] customize setup attachmentform
---
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 3 +++
1 file changed, 3 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 0e3d851..b47271a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -8,6 +8,9 @@ import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/c
import { ImageForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
import { CategoryForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm";
import {PriceForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm";
+import {
+ AttachmentForm
+} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm";
const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => {
const { userId } = await auth();
From 33156d5c9c185efce5af6d805f251ead7d31ba0f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:12:02 +0600
Subject: [PATCH 224/706] customize setup attachmentform
---
.../[courseId]/components/AttachmentForm.tsx | 66 ++++++++++---------
1 file changed, 34 insertions(+), 32 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 9a167b3..6977263 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -2,13 +2,13 @@
import React, { useState } from "react";
import * as z from "zod";
import axios from "axios";
-import {ImageIcon, Pencil, PlusCircle} from "lucide-react";
+import { ImageIcon, Pencil, PlusCircle } from "lucide-react";
import { Button } from "@/components/ui/button";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { Course } from "@prisma/client";
import Image from "next/image";
-import {FileUpload} from "@/components/file-upload";
+import { FileUpload } from "@/components/file-upload";
const formSchema = z.object({
imageUrl: z.string().min(1, {
@@ -25,7 +25,6 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
-
const toggleEdit = () => setIsEditing((current) => !current);
const onSubmit = async (values: z.infer) => {
@@ -36,6 +35,7 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
router.refresh();
} catch (error) {
console.error("Ошибка при обновлении курса:", error);
+ toast.error("Error updating course.");
}
};
@@ -44,47 +44,49 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
Course Attachment Resources
- {isEditing && (
+ {isEditing ? (
<>Cancel>
- )} { !isEditing && !initialData.imageUrl && (
+ ) : initialData.imageUrl ? (
<>
-
- Add an File
+ Edit Image
>
) : (
<>
- Edit Image
+
+ Add a File
>
)}
- {!isEditing && (
- !initialData.imageUrl ? (
-
-
-
+ {!isEditing ? (
+ !initialData.imageUrl ? (
+
+
+
+ ) : (
+
+
+
+ )
) : (
-
-
-
-
- )
- )}
- {isEditing && (
-
{
- if(url) {
- onSubmit({imageUrl: url})
- }
- }}
- />
-
- 16:9 aspect ralio recommended
-
-
+ {
+ if (url) {
+ onSubmit({ imageUrl: url });
+ }
+ }}
+ />
+
+ 16:9 aspect ratio recommended
+
-
)}
);
From efb8041ee13c9c7c3b7806c55444349bfe73129e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:12:58 +0600
Subject: [PATCH 225/706] customize setup attachmentform
---
.../(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 b47271a..802ade0 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -83,7 +83,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
Resource Attacment
-
+
From d0e7b148c87c2dc2e56df1cf492c852104289b6f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:15:14 +0600
Subject: [PATCH 226/706] customize setup attachmentform
---
.../courses/[courseId]/components/AttachmentForm.tsx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 6977263..e64694b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -46,10 +46,8 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
{isEditing ? (
<>Cancel>
- ) : initialData.imageUrl ? (
- <>
- Edit Image
- >
+ )}{!isEditing && (
+
) : (
<>
From 0bae7a041f42c265dcefadea702a329de504eb40 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:15:39 +0600
Subject: [PATCH 227/706] customize setup attachmentform
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index e64694b..6023948 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -47,8 +47,6 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
{isEditing ? (
<>Cancel>
)}{!isEditing && (
-
- ) : (
<>
Add a File
From f14b0eec98e8b802066568d9dca42d9d9bb9ad4d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:16:46 +0600
Subject: [PATCH 228/706] customize setup attachmentform
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 6023948..b613ba1 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -54,7 +54,7 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
)}
- {!isEditing ? (
+ {!isEditing && (
!initialData.imageUrl ? (
From 40923b72e7ee2d063dc8444a3bb4ac0b7114f35a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:20:29 +0600
Subject: [PATCH 229/706] customize setup attachmentform
---
.../[courseId]/components/AttachmentForm.tsx | 54 +++++++++----------
.../[courseId]/components/ImageForm.tsx | 2 -
2 files changed, 27 insertions(+), 29 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index b613ba1..951b0f2 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -2,13 +2,13 @@
import React, { useState } from "react";
import * as z from "zod";
import axios from "axios";
-import { ImageIcon, Pencil, PlusCircle } from "lucide-react";
+import {ImageIcon, Pencil, PlusCircle} from "lucide-react";
import { Button } from "@/components/ui/button";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { Course } from "@prisma/client";
import Image from "next/image";
-import { FileUpload } from "@/components/file-upload";
+import {FileUpload} from "@/components/file-upload";
const formSchema = z.object({
imageUrl: z.string().min(1, {
@@ -16,15 +16,16 @@ const formSchema = z.object({
}),
});
-interface AttachmentFormProps {
+interface ImageFormProps {
initialData: Course;
courseId: string;
}
-export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) => {
+export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
+
const toggleEdit = () => setIsEditing((current) => !current);
const onSubmit = async (values: z.infer) => {
@@ -35,54 +36,53 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
router.refresh();
} catch (error) {
console.error("Ошибка при обновлении курса:", error);
- toast.error("Error updating course.");
}
};
return (
- Course Attachment Resources
+ Course Image
{isEditing ? (
<>Cancel>
- )}{!isEditing && (
+ ) : !initialData?.imageUrl ? (
<>
- Add a File
+ Add an image
+ >
+ ) : (
+ <>
+ Edit Image
>
)}
{!isEditing && (
!initialData.imageUrl ? (
-
-
+
+
) : (
-
-
+
+
)
- ) : (
+ )}
+ {isEditing && (
-
{
- if (url) {
- onSubmit({ imageUrl: url });
- }
- }}
+ {
+ if(url) {
+ onSubmit({imageUrl: url})
+ }
+ }}
/>
-
- 16:9 aspect ratio recommended
+
+ 16:9 aspect ralio recommended
+
)}
);
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
index 4285fa1..c08d7fa 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm.tsx
@@ -67,7 +67,6 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
) : (
-
)
)}
@@ -81,7 +80,6 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
/>
16:9 aspect ralio recommended
-
From baa0366e4a3374034829f9b50255d3e2a10ccea4 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:21:37 +0600
Subject: [PATCH 230/706] customize setup attachmentform
---
.../courses/[courseId]/components/AttachmentForm.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 951b0f2..719a7ad 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -16,12 +16,12 @@ const formSchema = z.object({
}),
});
-interface ImageFormProps {
+interface AttachmentFormProps {
initialData: Course;
courseId: string;
}
-export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
+export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
@@ -51,7 +51,7 @@ export const ImageForm = ({ initialData, courseId }: ImageFormProps) => {
Add an image
>
- ) : (
+ ) {(!isEditing && !initialData
<>
Edit Image
>
From 6969d553eac7ffea9dc7ec5e63c4fad3fb8e9eb1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:22:57 +0600
Subject: [PATCH 231/706] customize setup attachmentform
---
.../courses/[courseId]/components/AttachmentForm.tsx | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 719a7ad..e77b566 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -46,16 +46,12 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
{isEditing ? (
<>Cancel>
- ) : !initialData?.imageUrl ? (
+ ) {!isEditing && !initialData mageUrl ? (
<>
Add an image
>
- ) {(!isEditing && !initialData
- <>
- Edit Image
- >
- )}
+ )
{!isEditing && (
From 57725fde2fb6cc567e34a3e53136dff9b699d095 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:23:55 +0600
Subject: [PATCH 232/706] customize setup attachmentform
---
.../courses/[courseId]/components/AttachmentForm.tsx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index e77b566..59504a0 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -44,14 +44,15 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
Course Image
- {isEditing ? (
+ {isEditing && (
<>Cancel>
- ) {!isEditing && !initialData mageUrl ? (
+ )}
+ {!isEditing && !initialData.imageUrl && (
<>
Add an image
>
- )
+ )}
{!isEditing && (
From 41f078626aa6012df6dd8213a35f82b6ff930bb6 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:29:38 +0600
Subject: [PATCH 233/706] customize setup attachmentform
---
.../courses/[courseId]/components/AttachmentForm.tsx | 6 +++---
.../(routes)/teacher/courses/[courseId]/page.tsx | 7 +++++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 59504a0..fa07565 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -6,7 +6,7 @@ import {ImageIcon, Pencil, PlusCircle} from "lucide-react";
import { Button } from "@/components/ui/button";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
-import { Course } from "@prisma/client";
+import {Attachment, Course} from "@prisma/client";
import Image from "next/image";
import {FileUpload} from "@/components/file-upload";
@@ -17,7 +17,7 @@ const formSchema = z.object({
});
interface AttachmentFormProps {
- initialData: Course;
+ initialData: Course &{attachements: Attachment[]};
courseId: string;
}
@@ -50,7 +50,7 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
{!isEditing && !initialData.imageUrl && (
<>
- Add an image
+ Add a File
>
)}
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 802ade0..55f85cc 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -20,6 +20,13 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
const course = await db.course.findUnique({
where: { id: params.courseId },
+ include:{
+ attachments:{
+ orderBy:{
+ createdAt: 'desc'
+ }
+ }
+ }
});
const categories = await db.category.findMany({ orderBy: { name: "asc" } });
From a9dbd9796d3ae94cf70a62c21dd726bbd2e9b9a9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:34:40 +0600
Subject: [PATCH 234/706] setup attachent log new feature
---
.../[courseId]/components/AttachmentForm.tsx | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index fa07565..3ec516d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -55,16 +55,14 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
)}
- {!isEditing && (
- !initialData.imageUrl ? (
-
-
-
- ) : (
-
-
-
+ <>
+ {initialData.attachements.length === 0 && (
+
+ Not attachemnt yet
+
+ >
+ )}
)
)}
{isEditing && (
From 435d1d90cc116e576175f64dd9002818733d61e0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:36:47 +0600
Subject: [PATCH 235/706] setup attachent log new feature
---
.../courses/[courseId]/components/AttachmentForm.tsx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 3ec516d..f0b5646 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -61,15 +61,14 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
>
Not attachemnt yet
- >
)}
- )
+ >
)}
{isEditing && (
- {
+ {
if(url) {
- onSubmit({imageUrl: url})
+ onSubmit({url: url})
}
}}
/>
@@ -77,7 +76,6 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
16:9 aspect ralio recommended
-
)}
);
From 74d7479ed4a5fbc4ad659320eb3ff43b5aff0958 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:37:09 +0600
Subject: [PATCH 236/706] setup attachent log new feature
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index f0b5646..3784288 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -73,7 +73,7 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
}}
/>
- 16:9 aspect ralio recommended
+ Add anything
)}
From 2d706f7c124f5e68069d9edbde57378cfe7960c7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:38:12 +0600
Subject: [PATCH 237/706] customize setup attachmentform
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 3784288..edf0042 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -30,7 +30,7 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
const onSubmit = async (values: z.infer) => {
try {
- await axios.patch(`/api/courses/${courseId}`, values);
+ await axios.post(`/api/courses/${courseId}/attachments`, values);
toast.success("Course updated!");
toggleEdit();
router.refresh();
@@ -73,7 +73,7 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
}}
/>
- Add anything
+ Add anything your students might need to complete the course
)}
From 8ddfe4e372b6e1ffeeb0dce93df1a32199e2d27b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:39:05 +0600
Subject: [PATCH 238/706] customize setup attachmentform
---
src/app/api/courses/[courseId]/attachments/route.ts | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 src/app/api/courses/[courseId]/attachments/route.ts
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
new file mode 100644
index 0000000..e69de29
From eddabd2efbef8239108d0d6c8d5eb6d51955d448 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:39:33 +0600
Subject: [PATCH 239/706] customize setup attachmentform
---
src/app/api/courses/[courseId]/attachments/route.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index e69de29..f2fe6d6 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -0,0 +1,3 @@
+export async function POST{
+ req:Request,
+}
\ No newline at end of file
From 3dea7a0fbd3b1942d77691b7e02afe7e4f66b643 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:40:02 +0600
Subject: [PATCH 240/706] customize setup attachmentform
---
src/app/api/courses/[courseId]/attachments/route.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index f2fe6d6..3e3f2ec 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -1,3 +1,4 @@
export async function POST{
req:Request,
+ {params}: {params: courseId:string}
}
\ No newline at end of file
From c2c867a025c22350bedd2ccf6c26384d368299e6 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:40:31 +0600
Subject: [PATCH 241/706] customize setup attachmentform
---
src/app/api/courses/[courseId]/attachments/route.ts | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 3e3f2ec..6fd4a08 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -1,4 +1,8 @@
-export async function POST{
+export async function POST(
req:Request,
{params}: {params: courseId:string}
+){
+ try {
+const {}
+ }catch(err){}
}
\ No newline at end of file
From 32d64e0d2c913e8b8f6ca33d5765dc0578e679cd Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:41:55 +0600
Subject: [PATCH 242/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 6fd4a08..9265d6c 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -3,6 +3,10 @@ export async function POST(
{params}: {params: courseId:string}
){
try {
-const {}
+const {userId} = auth();
+const {url} = await req.json()
+ if(!userId){
+
+ }
}catch(err){}
}
\ No newline at end of file
From fd7f04f290333c6337437e43f75b2a96b5aed1eb Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:42:30 +0600
Subject: [PATCH 243/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 9265d6c..998240b 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -1,3 +1,5 @@
+import {NextResponse} from "next/server";
+
export async function POST(
req:Request,
{params}: {params: courseId:string}
@@ -6,7 +8,7 @@ export async function POST(
const {userId} = auth();
const {url} = await req.json()
if(!userId){
-
+return new NextResponse('Unauthorized', {status:401});
}
}catch(err){}
}
\ No newline at end of file
From 1ef4d6d30bb4cda555584de30acf914e397debf6 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:42:57 +0600
Subject: [PATCH 244/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 998240b..166fefc 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -10,5 +10,6 @@ const {url} = await req.json()
if(!userId){
return new NextResponse('Unauthorized', {status:401});
}
+ const courseOwner = await db.course
}catch(err){}
}
\ No newline at end of file
From 2277a3b2b4b4c4c2acfd7c6f264924a7542a0c1a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:43:20 +0600
Subject: [PATCH 245/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 166fefc..49f70c9 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -10,6 +10,6 @@ const {url} = await req.json()
if(!userId){
return new NextResponse('Unauthorized', {status:401});
}
- const courseOwner = await db.course
+ const courseOwner = await db.course.findUnique({where:{id:params.courseId}});
}catch(err){}
}
\ No newline at end of file
From de345b90a8eb40d106312ba94d422c967a2029c7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:44:05 +0600
Subject: [PATCH 246/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 49f70c9..5542403 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -11,5 +11,8 @@ const {url} = await req.json()
return new NextResponse('Unauthorized', {status:401});
}
const courseOwner = await db.course.findUnique({where:{id:params.courseId}});
+ if(!courseOwner){
+ return new NextResponse('Unautorized', {status:401})
+ }
}catch(err){}
}
\ No newline at end of file
From 65487edc693a7a1a52d93e046935ba499705a4fa Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:45:07 +0600
Subject: [PATCH 247/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 5542403..85ab7b9 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -14,5 +14,7 @@ return new NextResponse('Unauthorized', {status:401});
if(!courseOwner){
return new NextResponse('Unautorized', {status:401})
}
+
+ const
}catch(err){}
}
\ No newline at end of file
From ab55beb1efdec1c06d5318d4f890cc819560b8a6 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:45:23 +0600
Subject: [PATCH 248/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 85ab7b9..428d4c7 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -15,6 +15,8 @@ return new NextResponse('Unauthorized', {status:401});
return new NextResponse('Unautorized', {status:401})
}
- const
+ const attachment = await db.attachment.create({
+ data:courseOwner,
+ })
}catch(err){}
}
\ No newline at end of file
From 0787fc6020f9e8c7ec477cb257c4cd2748aa4ff6 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:45:37 +0600
Subject: [PATCH 249/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 428d4c7..fe42e03 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -16,7 +16,10 @@ return new NextResponse('Unauthorized', {status:401});
}
const attachment = await db.attachment.create({
- data:courseOwner,
+ data:{
+ url,
+ name:url.split('/')[0]
+ }
})
}catch(err){}
}
\ No newline at end of file
From b4d22c5f8ed81781f8888f69ef164e2f22161eee Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:45:57 +0600
Subject: [PATCH 250/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index fe42e03..2cb4e75 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -18,7 +18,8 @@ return new NextResponse('Unauthorized', {status:401});
const attachment = await db.attachment.create({
data:{
url,
- name:url.split('/')[0]
+ name:url.split('/').pop(),
+ courseId:params.courseId
}
})
}catch(err){}
From 9ce1069d21ba322d2c268ea49759edff1c1820e7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:46:41 +0600
Subject: [PATCH 251/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 2cb4e75..572d551 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -22,5 +22,10 @@ return new NextResponse('Unauthorized', {status:401});
courseId:params.courseId
}
})
- }catch(err){}
+ }catch(err){
+
+
+ console.log('COURSE_ID_ATTACHEMENTS', error);
+ return new NextResponse('Internal server error', err);
+ }
}
\ No newline at end of file
From 83b91b92f7fe24a9ebd348d9cc3423cdf4bcff2e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:46:53 +0600
Subject: [PATCH 252/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 572d551..b1ceb05 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -26,6 +26,6 @@ return new NextResponse('Unauthorized', {status:401});
console.log('COURSE_ID_ATTACHEMENTS', error);
- return new NextResponse('Internal server error', err);
+ return new NextResponse('Internal server error',{status:500});
}
}
\ No newline at end of file
From ca11548f1074b2b50bb54a44023e04e81b2aa240 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:47:14 +0600
Subject: [PATCH 253/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index b1ceb05..0c78b63 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -22,9 +22,9 @@ return new NextResponse('Unauthorized', {status:401});
courseId:params.courseId
}
})
- }catch(err){
-
+ return NextResponse
+ }catch(err){
console.log('COURSE_ID_ATTACHEMENTS', error);
return new NextResponse('Internal server error',{status:500});
}
From 8c040f99505940b1da3e6bc2921d9f70d8582726 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Tue, 11 Feb 2025 23:47:41 +0600
Subject: [PATCH 254/706] customize routets server actions for attachemnt on
api
---
src/app/api/courses/[courseId]/attachments/route.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 0c78b63..1178a15 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -23,7 +23,7 @@ return new NextResponse('Unauthorized', {status:401});
}
})
- return NextResponse
+ return NextResponse.json(attachment);
}catch(err){
console.log('COURSE_ID_ATTACHEMENTS', error);
return new NextResponse('Internal server error',{status:500});
From b7f24df8cb5121f6dbee90d6d7084516663e7155 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:17:58 +0600
Subject: [PATCH 255/706] customixe route ts for attachemnt
---
.../courses/[courseId]/attachments/route.ts | 48 +++++++++++--------
1 file changed, 27 insertions(+), 21 deletions(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 1178a15..93c10fa 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -1,31 +1,37 @@
-import {NextResponse} from "next/server";
+import { NextResponse } from "next/server";
+import {auth} from "@clerk/nextjs/server";
+import {db} from "@/lib/db";
-export async function POST(
- req:Request,
- {params}: {params: courseId:string}
-){
+export async function POST(req: Request, { params }: { params: { courseId: string } }) {
try {
-const {userId} = auth();
-const {url} = await req.json()
- if(!userId){
-return new NextResponse('Unauthorized', {status:401});
+ const { userId } = await auth();
+ const { url } = await req.json();
+
+ if (!userId) {
+ return new NextResponse('Unauthorized', { status: 401 });
+ }
+
+ const courseOwner = await db.course.findUnique({ where: { id: params.courseId } });
+ if (!courseOwner) {
+ return new NextResponse('Not Found', { status: 404 }); // изменен статус с 401 на 404
}
- const courseOwner = await db.course.findUnique({where:{id:params.courseId}});
- if(!courseOwner){
- return new NextResponse('Unautorized', {status:401})
+
+ const fileName = url.split('/').pop();
+ if (!fileName) {
+ return new NextResponse('Invalid file URL', { status: 400 });
}
- const attachment = await db.attachment.create({
- data:{
+ const attachment = await db.attachment.create({
+ data: {
url,
- name:url.split('/').pop(),
- courseId:params.courseId
+ name: fileName,
+ courseId: params.courseId,
}
- })
+ });
return NextResponse.json(attachment);
- }catch(err){
- console.log('COURSE_ID_ATTACHEMENTS', error);
- return new NextResponse('Internal server error',{status:500});
+ } catch (err) {
+ console.log('COURSE_ID_ATTACHEMENTS', err);
+ return new NextResponse('Internal server error', { status: 500 });
}
-}
\ No newline at end of file
+}
From a83dd8e71ac74e62dc1ae74f31f144cd84a47a69 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:21:32 +0600
Subject: [PATCH 256/706] fixing attachment schema
---
src/app/api/courses/[courseId]/attachments/route.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 93c10fa..38cdde2 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -13,7 +13,7 @@ export async function POST(req: Request, { params }: { params: { courseId: strin
const courseOwner = await db.course.findUnique({ where: { id: params.courseId } });
if (!courseOwner) {
- return new NextResponse('Not Found', { status: 404 }); // изменен статус с 401 на 404
+ return new NextResponse('Not Found', { status: 404 });
}
const fileName = url.split('/').pop();
From 134914d6bfd0bebc435bf5b95731108624969462 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:25:27 +0600
Subject: [PATCH 257/706] attachemnt form fixing
---
prisma/schema.prisma | 1 +
.../[courseId]/components/AttachmentForm.tsx | 50 ++++++++-----------
2 files changed, 23 insertions(+), 28 deletions(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 7347803..18607e0 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -32,6 +32,7 @@ model Category {
model Attachment {
id String @id @default(cuid())
+ name String
url String @db.Text
Course Course? @relation(fields: [courseId], references: [id])
courseId String?
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index edf0042..5fb260a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -1,23 +1,19 @@
-"use client";
import React, { useState } from "react";
import * as z from "zod";
import axios from "axios";
-import {ImageIcon, Pencil, PlusCircle} from "lucide-react";
+import { ImageIcon, Pencil, PlusCircle } from "lucide-react";
import { Button } from "@/components/ui/button";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
-import {Attachment, Course} from "@prisma/client";
-import Image from "next/image";
-import {FileUpload} from "@/components/file-upload";
+import { Attachment, Course } from "@prisma/client";
+import { FileUpload } from "@/components/file-upload";
const formSchema = z.object({
- imageUrl: z.string().min(1, {
- message: "Image is required",
- }),
+ url: z.string().min(1),
});
interface AttachmentFormProps {
- initialData: Course &{attachements: Attachment[]};
+ initialData: Course & { attachements: Attachment[] };
courseId: string;
}
@@ -25,7 +21,6 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
-
const toggleEdit = () => setIsEditing((current) => !current);
const onSubmit = async (values: z.infer) => {
@@ -44,36 +39,35 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
Course Image
- {isEditing && (
+ {isEditing ? (
<>Cancel>
- )}
- {!isEditing && !initialData.imageUrl && (
+ ) : !initialData.imageUrl ? (
<>
Add a File
>
+ ) : (
+ "Edit Image"
)}
- <>
- {initialData.attachements.length === 0 && (
-
- Not attachemnt yet
-
- )}
- >
+ {initialData.attachements.length === 0 && (
+
+ Not attachment yet
+
)}
{isEditing && (
-
{
- if(url) {
- onSubmit({url: url})
- }
- }}
+ {
+ if (url) {
+ onSubmit({ url: url });
+ }
+ }}
/>
-
- Add anything your students might need to complete the course
+
+ Add anything your students might need to complete the course
)}
From d6eea2d538c6504f1f9a50fa6fa9e29ae265f8a1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:30:51 +0600
Subject: [PATCH 258/706] maybe fixed attachemn form
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 5fb260a..1246894 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -56,7 +56,6 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
Not attachment yet
)}
- {isEditing && (
- )}
+ )
);
};
From 74f2b3408ee6dceeee7e6eeb91787a031d2e5aec Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:39:00 +0600
Subject: [PATCH 259/706] maybe fixed attachemn form
---
.../(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 55f85cc..6c92dd0 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -90,7 +90,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
Resource Attacment
-
+ {/**/}
From c99e827e7cdd8e5085d435db3569bb523a400363 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:47:22 +0600
Subject: [PATCH 260/706] maybe fixed attachemn form
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 4 ++--
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 2 +-
src/app/api/courses/[courseId]/attachments/route.ts | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 1246894..086d318 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -13,7 +13,7 @@ const formSchema = z.object({
});
interface AttachmentFormProps {
- initialData: Course & { attachements: Attachment[] };
+ initialData: Course & { attachments: Attachment[] };
courseId: string;
}
@@ -51,7 +51,7 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
)}
- {initialData.attachements.length === 0 && (
+ {initialData.attachments.length === 0 && (
Not attachment yet
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 6c92dd0..55f85cc 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -90,7 +90,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
Resource Attacment
- {/**/}
+
diff --git a/src/app/api/courses/[courseId]/attachments/route.ts b/src/app/api/courses/[courseId]/attachments/route.ts
index 38cdde2..b9e349d 100644
--- a/src/app/api/courses/[courseId]/attachments/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/route.ts
@@ -31,7 +31,7 @@ export async function POST(req: Request, { params }: { params: { courseId: strin
return NextResponse.json(attachment);
} catch (err) {
- console.log('COURSE_ID_ATTACHEMENTS', err);
+ console.log('COURSE_ID_ATTACHMENTS', err);
return new NextResponse('Internal server error', { status: 500 });
}
}
From 41b8b6dddaa69b1bb4e8c5516ab640a8748d26da Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:50:12 +0600
Subject: [PATCH 261/706] fixed style tailwind flex
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 1 +
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 4 ----
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 086d318..0ddbac4 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -1,3 +1,4 @@
+'use client'
import React, { useState } from "react";
import * as z from "zod";
import axios from "axios";
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 55f85cc..531ed24 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -77,15 +77,12 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
TODO: Chapters
-
-
Sell your course
-
Resource Attacment
@@ -93,7 +90,6 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
-
);
};
From 4c5fb1f664dd9822306276eb86eb95099d2553e4 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:54:48 +0600
Subject: [PATCH 262/706] fixed style tailwind flex
---
.../[courseId]/components/AttachmentForm.tsx | 27 +++++++++----------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 0ddbac4..9a06ffa 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -1,4 +1,4 @@
-'use client'
+'use client';
import React, { useState } from "react";
import * as z from "zod";
import axios from "axios";
@@ -57,20 +57,19 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
Not attachment yet
)}
-
-
{
- if (url) {
- onSubmit({ url: url });
- }
- }}
- />
-
- Add anything your students might need to complete the course
-
+
+
{
+ if (url) {
+ onSubmit({ url });
+ }
+ }}
+ />
+
+ Add anything your students might need to complete the course
- )
+
);
};
From 99216d916f215c635b382dfaaf1908c4c13ef4c1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:56:19 +0600
Subject: [PATCH 263/706] just fixing
---
.../courses/[courseId]/components/AttachmentForm.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 9a06ffa..a7d4812 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -38,11 +38,11 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
return (
- Course Image
+ Course Attachments
- {isEditing ? (
+ {isEditing &&(
<>Cancel>
- ) : !initialData.imageUrl ? (
+ )} : !initialData.imageUrl ? (
<>
Add a File
From eb1bbe3a79ee38075155a0718892d3dd230f1897 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 17:57:58 +0600
Subject: [PATCH 264/706] just fixing
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index a7d4812..ee8ce20 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -42,13 +42,11 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
{isEditing &&(
<>Cancel>
- )} : !initialData.imageUrl ? (
+ )}{!isEditing && (
<>
Add a File
>
- ) : (
- "Edit Image"
)}
From bad0e5368256c40ba747a9de949b0e60dc253cb9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Wed, 12 Feb 2025 18:03:14 +0600
Subject: [PATCH 265/706] just fixing
---
.../[courseId]/components/AttachmentForm.tsx | 42 +++++++++++--------
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index ee8ce20..ccce515 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -30,8 +30,8 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
toast.success("Course updated!");
toggleEdit();
router.refresh();
- } catch (error) {
- console.error("Ошибка при обновлении курса:", error);
+ } catch (error: any) {
+ toast.error(`Ошибка при обновлении курса: ${error.message}`);
}
};
@@ -40,9 +40,9 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
Course Attachments
- {isEditing &&(
+ {isEditing ? (
<>Cancel>
- )}{!isEditing && (
+ ) : (
<>
Add a File
@@ -50,24 +50,30 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
)}
- {initialData.attachments.length === 0 && (
+
+ {/* Проверяем, есть ли attachments */}
+ {initialData.attachments.length === 0 && !isEditing && (
- Not attachment yet
+ No attachment yet
)}
-
-
{
- if (url) {
- onSubmit({ url });
- }
- }}
- />
-
- Add anything your students might need to complete the course
+
+ {/* Отображаем FileUpload только если isEditing true */}
+ {isEditing && (
+
+
{
+ if (url) {
+ onSubmit({ url });
+ }
+ }}
+ />
+
+ Add anything your students might need to complete the course
+
-
+ )}
);
};
From ba8ea2bfa3fa8b126118c5a743676d095c237145 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 07:13:13 +0600
Subject: [PATCH 266/706] fixed style on attachemnts courseId page
---
.../teacher/courses/[courseId]/page.tsx | 57 +++++++++++--------
1 file changed, 34 insertions(+), 23 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 531ed24..bb699a3 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -2,15 +2,13 @@ import { db } from "@/lib/db";
import { auth } from "@clerk/nextjs/server";
import { redirect } from "next/navigation";
import { IconBadge } from "@/components/icon-badge";
-import { CircleDollarSign, LayoutDashboard, ListChecks,File } from "lucide-react";
+import { CircleDollarSign, LayoutDashboard, ListChecks, File } from "lucide-react";
import { TitleForm } from "./components/TitleForm";
import { DescriptionForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/DescriptionForm";
import { ImageForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ImageForm";
import { CategoryForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm";
-import {PriceForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm";
-import {
- AttachmentForm
-} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm";
+import { PriceForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm";
+import { AttachmentForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm";
const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => {
const { userId } = await auth();
@@ -20,13 +18,13 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
const course = await db.course.findUnique({
where: { id: params.courseId },
- include:{
- attachments:{
- orderBy:{
- createdAt: 'desc'
- }
- }
- }
+ include: {
+ attachments: {
+ orderBy: {
+ createdAt: "desc",
+ },
+ },
+ },
});
const categories = await db.category.findMany({ orderBy: { name: "asc" } });
@@ -35,7 +33,13 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
return redirect("/");
}
- const requiredFields = [course.title, course.description, course.imageUrl, course.price, course.categoryId];
+ 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})`;
@@ -51,7 +55,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
-
+
Customize your course
@@ -77,19 +81,26 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
TODO: Chapters
-
-
-
Sell your course
+
+
+
+
+
Sell your course
+
+
-
-
-
-
-
Resource Attacment
+
+ {/* ✅ Теперь Resource Attachment в правильном месте */}
+
+
+
+
Resource Attachment
+
+
-
+
);
};
From 1b190f2ed554535c67aafcbacbbc44fe0c8e9724 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 07:15:28 +0600
Subject: [PATCH 267/706] customixe attachment form again
---
.../[courseId]/components/AttachmentForm.tsx | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index ccce515..5b91483 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -51,14 +51,15 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
- {/* Проверяем, есть ли attachments */}
- {initialData.attachments.length === 0 && !isEditing && (
-
- No attachment yet
-
+ {initialData.attachments.length > 0 && (
+
+ {initialData.attachments.map((attachment) => (
+
+
+ ))}
+
)}
- {/* Отображаем FileUpload только если isEditing true */}
{isEditing && (
Date: Thu, 13 Feb 2025 07:18:35 +0600
Subject: [PATCH 268/706] customixe attachment form again
---
.../courses/[courseId]/components/AttachmentForm.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 5b91483..057abd3 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -2,7 +2,7 @@
import React, { useState } from "react";
import * as z from "zod";
import axios from "axios";
-import { ImageIcon, Pencil, PlusCircle } from "lucide-react";
+import {File, ImageIcon, Pencil, PlusCircle} from "lucide-react";
import { Button } from "@/components/ui/button";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
@@ -54,7 +54,10 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
{initialData.attachments.length > 0 && (
{initialData.attachments.map((attachment) => (
-
+
+
+
+
))}
From ec4d41d11ad04ae5e08b5d0995e096bd22489331 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 07:37:33 +0600
Subject: [PATCH 269/706] nice work but i dont found a ful stack course about
graphl ...
---
.../teacher/courses/[courseId]/components/AttachmentForm.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 057abd3..84e1011 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -56,7 +56,9 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
{initialData.attachments.map((attachment) => (
-
+
+ {attachment.name}
+
))}
From 15215018d2bf8846c5afe5d3c79a626df56797b4 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 07:42:47 +0600
Subject: [PATCH 270/706] nice work but i dont found a ful stack course about
graphl ...
---
.../[courseId]/components/AttachmentForm.tsx | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 84e1011..3d899d7 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -2,7 +2,7 @@
import React, { useState } from "react";
import * as z from "zod";
import axios from "axios";
-import {File, ImageIcon, Pencil, PlusCircle} from "lucide-react";
+import {File, ImageIcon, Loader2, Pencil, PlusCircle, X} from "lucide-react";
import { Button } from "@/components/ui/button";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
@@ -20,6 +20,7 @@ interface AttachmentFormProps {
export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) => {
const [isEditing, setIsEditing] = useState(false);
+ const [deletingId,setDeletingId] = useState(null);
const router = useRouter();
const toggleEdit = () => setIsEditing((current) => !current);
@@ -56,9 +57,21 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
{initialData.attachments.map((attachment) => (
-
+
{attachment.name}
+ {deletingId === attachment.id && (
+
+
+
+ )} {deletingId === attachment.id && (
+
+
+
+
+
+
+ )}
))}
From ccf23aa5e34437794682061b85da53dace7a7938 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 07:46:41 +0600
Subject: [PATCH 271/706] fixed some bug
---
.../courses/[courseId]/components/AttachmentForm.tsx | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 3d899d7..d97872b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -64,13 +64,10 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
- )} {deletingId === attachment.id && (
-
-
-
+ )} {deletingId !== attachment.id && (
+
+
-
-
)}
From bafc7bacaa10ddbed459405e559209d045633008 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 07:58:08 +0600
Subject: [PATCH 272/706] fixed some bug
---
.../[courseId]/components/AttachmentForm.tsx | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index d97872b..7d1c06d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -36,6 +36,17 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
}
};
+
+ const onDelete = async(id:string) => {
+ try {
+setDeletingId(id)
+ await axios.delete(`/api/courses/${courseId}/attachments/${id}`)
+ }
+ catch (error) {
+toast.error('Something went wrong!');
+ }
+ }
+
return (
@@ -65,7 +76,7 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
)} {deletingId !== attachment.id && (
-
+ onDelete(attachment.id)} className='ml-auto hover:opacity-75 transition'>
)}
From 0e08ec27d63683c4660d344182c4095b4b1f10a2 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:00:13 +0600
Subject: [PATCH 273/706] creating next api route for attachemntId
---
.../courses/[courseId]/attachments/[attachementId]/route.ts | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
diff --git a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
new file mode 100644
index 0000000..e7edcd1
--- /dev/null
+++ b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
@@ -0,0 +1,4 @@
+export async function DELETE(
+ req: Request,
+ {params}: {params: {courseId:string,attachmentId:string}}
+)
\ No newline at end of file
From c2ae621d7e8def007b5759204287bc3e813da30a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:05:38 +0600
Subject: [PATCH 274/706] creating next api route for attachemntId
---
.../attachments/[attachementId]/route.ts | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
index e7edcd1..aedffcf 100644
--- a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
@@ -1,4 +1,26 @@
+import {NextResponse} from "next/server";
+import {auth} from "@clerk/nextjs/server";
+import {db} from "@/lib/db";
+
export async function DELETE(
req: Request,
{params}: {params: {courseId:string,attachmentId:string}}
-)
\ No newline at end of file
+){
+ try {
+const {userId} = await auth()
+ return new NextResponse('Unauthorized', {status: 401})
+ }
+
+ const courseOwner = await db.course.findUnique({
+ where:{
+ id: params.courseId,
+ userId:userId
+
+ }
+ })
+
+ catch (error) {
+ console.error('ATTACHMENT_ID', error);
+ return new NextResponse('Internal server error', {status:500});
+ }
+}
\ No newline at end of file
From 96287c6e533dcac750017bee976322aedddcb417 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:07:35 +0600
Subject: [PATCH 275/706] creating next api route for attachemntId
---
.../attachments/[attachementId]/route.ts | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
index aedffcf..e263664 100644
--- a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
@@ -7,17 +7,17 @@ export async function DELETE(
{params}: {params: {courseId:string,attachmentId:string}}
){
try {
-const {userId} = await auth()
- return new NextResponse('Unauthorized', {status: 401})
- }
-
- const courseOwner = await db.course.findUnique({
- where:{
- id: params.courseId,
- userId:userId
-
+ const {userId} = await auth()
+ if (!userId) {
+ return new NextResponse('Unauthorized', {status: 401})
}
- })
+ const courseOwner = await db.course.findUnique({
+ where: {
+ id: params.courseId,
+ userId: userId
+ }
+ })
+ }
catch (error) {
console.error('ATTACHMENT_ID', error);
From 28afd1bc408549764fbeeede14697ee5fa1fea17 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:12:42 +0600
Subject: [PATCH 276/706] creating next api route for attachemntId
---
.../[courseId]/attachments/[attachementId]/route.ts | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
index e263664..702e5ab 100644
--- a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
@@ -17,8 +17,18 @@ export async function DELETE(
userId: userId
}
})
- }
+ if (!courseOwner) {
+ return new NextResponse('Unautorized', {status: 401})
+ }
+ const attachment = await db.attachment.delete({
+ where: {
+ courseId: params.courseId,
+ id: params.attachmentId,
+ }
+ })
+ return NextResponse.json(attachment)
+ }
catch (error) {
console.error('ATTACHMENT_ID', error);
return new NextResponse('Internal server error', {status:500});
From 720b5460410f24f89e447bb4743e3474ad420e31 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:16:58 +0600
Subject: [PATCH 277/706] attachment delete Query
---
.../courses/[courseId]/components/AttachmentForm.tsx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
index 7d1c06d..5e8cd99 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm.tsx
@@ -41,10 +41,15 @@ export const AttachmentForm = ({ initialData, courseId }: AttachmentFormProps) =
try {
setDeletingId(id)
await axios.delete(`/api/courses/${courseId}/attachments/${id}`)
+ toast.success("Attachment deleted!");
+router.refresh();
}
catch (error) {
toast.error('Something went wrong!');
}
+ finally {
+ setDeletingId(null);
+ }
}
return (
@@ -71,7 +76,7 @@ toast.error('Something went wrong!');
{attachment.name}
- {deletingId === attachment.id && (
+ {deletingId === attachment.id && (
From d7da5bca92574e141c16217796cadde59708c03f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:22:37 +0600
Subject: [PATCH 278/706] some bug attachments form
---
.../migration.sql | 43 +++++
.../migrations/20250210100014_/migration.sql | 2 +
prisma/migrations/migration_lock.toml | 3 +
src/components/ui/command.tsx | 153 ++++++++++++++++++
src/components/ui/dialog.tsx | 122 ++++++++++++++
src/components/ui/popover.tsx | 31 ++++
6 files changed, 354 insertions(+)
create mode 100644 prisma/migrations/20250210095441_user_id_category/migration.sql
create mode 100644 prisma/migrations/20250210100014_/migration.sql
create mode 100644 prisma/migrations/migration_lock.toml
create mode 100644 src/components/ui/command.tsx
create mode 100644 src/components/ui/dialog.tsx
create mode 100644 src/components/ui/popover.tsx
diff --git a/prisma/migrations/20250210095441_user_id_category/migration.sql b/prisma/migrations/20250210095441_user_id_category/migration.sql
new file mode 100644
index 0000000..a05839e
--- /dev/null
+++ b/prisma/migrations/20250210095441_user_id_category/migration.sql
@@ -0,0 +1,43 @@
+-- CreateTable
+CREATE TABLE "Category" (
+ "id" TEXT NOT NULL,
+ "name" TEXT NOT NULL,
+
+ CONSTRAINT "Category_pkey" PRIMARY KEY ("id")
+);
+
+-- CreateTable
+CREATE TABLE "courses" (
+ "id" TEXT NOT NULL,
+ "userId" TEXT NOT NULL,
+ "title" TEXT,
+ "description" TEXT,
+ "imageUrl" TEXT,
+ "price" DOUBLE PRECISION,
+ "isPublished" BOOLEAN NOT NULL DEFAULT false,
+ "categoryId" TEXT,
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ "updateAt" TIMESTAMP(3) NOT NULL,
+
+ CONSTRAINT "courses_pkey" PRIMARY KEY ("id")
+);
+
+-- CreateTable
+CREATE TABLE "attachments" (
+ "id" TEXT NOT NULL,
+ "url" TEXT NOT NULL,
+ "courseId" TEXT,
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ "updateAt" TIMESTAMP(3) NOT NULL,
+
+ CONSTRAINT "attachments_pkey" PRIMARY KEY ("id")
+);
+
+-- CreateIndex
+CREATE UNIQUE INDEX "Category_name_key" ON "Category"("name");
+
+-- AddForeignKey
+ALTER TABLE "courses" ADD CONSTRAINT "courses_categoryId_fkey" FOREIGN KEY ("categoryId") REFERENCES "Category"("id") ON DELETE SET NULL ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "attachments" ADD CONSTRAINT "attachments_courseId_fkey" FOREIGN KEY ("courseId") REFERENCES "courses"("id") ON DELETE SET NULL ON UPDATE CASCADE;
diff --git a/prisma/migrations/20250210100014_/migration.sql b/prisma/migrations/20250210100014_/migration.sql
new file mode 100644
index 0000000..6c03b2b
--- /dev/null
+++ b/prisma/migrations/20250210100014_/migration.sql
@@ -0,0 +1,2 @@
+-- AlterTable
+ALTER TABLE "courses" ALTER COLUMN "userId" DROP NOT NULL;
diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml
new file mode 100644
index 0000000..648c57f
--- /dev/null
+++ b/prisma/migrations/migration_lock.toml
@@ -0,0 +1,3 @@
+# Please do not edit this file manually
+# It should be added in your version-control system (e.g., Git)
+provider = "postgresql"
\ No newline at end of file
diff --git a/src/components/ui/command.tsx b/src/components/ui/command.tsx
new file mode 100644
index 0000000..59a2645
--- /dev/null
+++ b/src/components/ui/command.tsx
@@ -0,0 +1,153 @@
+"use client"
+
+import * as React from "react"
+import { type DialogProps } from "@radix-ui/react-dialog"
+import { Command as CommandPrimitive } from "cmdk"
+import { Search } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+import { Dialog, DialogContent } from "@/components/ui/dialog"
+
+const Command = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+Command.displayName = CommandPrimitive.displayName
+
+const CommandDialog = ({ children, ...props }: DialogProps) => {
+ return (
+
+
+
+ {children}
+
+
+
+ )
+}
+
+const CommandInput = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+
+
+
+))
+
+CommandInput.displayName = CommandPrimitive.Input.displayName
+
+const CommandList = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+
+CommandList.displayName = CommandPrimitive.List.displayName
+
+const CommandEmpty = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>((props, ref) => (
+
+))
+
+CommandEmpty.displayName = CommandPrimitive.Empty.displayName
+
+const CommandGroup = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+
+CommandGroup.displayName = CommandPrimitive.Group.displayName
+
+const CommandSeparator = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+CommandSeparator.displayName = CommandPrimitive.Separator.displayName
+
+const CommandItem = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+
+CommandItem.displayName = CommandPrimitive.Item.displayName
+
+const CommandShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes) => {
+ return (
+
+ )
+}
+CommandShortcut.displayName = "CommandShortcut"
+
+export {
+ Command,
+ CommandDialog,
+ CommandInput,
+ CommandList,
+ CommandEmpty,
+ CommandGroup,
+ CommandItem,
+ CommandShortcut,
+ CommandSeparator,
+}
diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx
new file mode 100644
index 0000000..12cd3db
--- /dev/null
+++ b/src/components/ui/dialog.tsx
@@ -0,0 +1,122 @@
+ "use client"
+
+ import * as React from "react"
+ import * as DialogPrimitive from "@radix-ui/react-dialog"
+ import { X } from "lucide-react"
+ import {cn} from "@/lib/utils";
+
+
+ const Dialog = DialogPrimitive.Root
+
+ const DialogTrigger = DialogPrimitive.Trigger
+
+ const DialogPortal = DialogPrimitive.Portal
+
+ const DialogClose = DialogPrimitive.Close
+
+ const DialogOverlay = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+ >(({ className, ...props }, ref) => (
+
+ ))
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
+
+ const DialogContent = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+ >(({ className, children, ...props }, ref) => (
+
+
+
+ {children}
+
+
+ Close
+
+
+
+ ))
+ DialogContent.displayName = DialogPrimitive.Content.displayName
+
+ const DialogHeader = ({
+ className,
+ ...props
+ }: React.HTMLAttributes) => (
+
+ )
+ DialogHeader.displayName = "DialogHeader"
+
+ const DialogFooter = ({
+ className,
+ ...props
+ }: React.HTMLAttributes) => (
+
+ )
+ DialogFooter.displayName = "DialogFooter"
+
+ const DialogTitle = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+ >(({ className, ...props }, ref) => (
+
+ ))
+ DialogTitle.displayName = DialogPrimitive.Title.displayName
+
+ const DialogDescription = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+ >(({ className, ...props }, ref) => (
+
+ ))
+ DialogDescription.displayName = DialogPrimitive.Description.displayName
+
+ export {
+ Dialog,
+ DialogPortal,
+ DialogOverlay,
+ DialogClose,
+ DialogTrigger,
+ DialogContent,
+ DialogHeader,
+ DialogFooter,
+ DialogTitle,
+ DialogDescription,
+ }
diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx
new file mode 100644
index 0000000..a0ec48b
--- /dev/null
+++ b/src/components/ui/popover.tsx
@@ -0,0 +1,31 @@
+"use client"
+
+import * as React from "react"
+import * as PopoverPrimitive from "@radix-ui/react-popover"
+
+import { cn } from "@/lib/utils"
+
+const Popover = PopoverPrimitive.Root
+
+const PopoverTrigger = PopoverPrimitive.Trigger
+
+const PopoverContent = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
+
+
+
+))
+PopoverContent.displayName = PopoverPrimitive.Content.displayName
+
+export { Popover, PopoverTrigger, PopoverContent }
From d11885196bb3a9370a429327e81e64cd4b957381 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:32:37 +0600
Subject: [PATCH 279/706] some bugging in route ts attachment
---
.../attachments/[attachementId]/route.ts | 61 +++++++++++--------
1 file changed, 37 insertions(+), 24 deletions(-)
diff --git a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
index 702e5ab..90857f3 100644
--- a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
@@ -1,36 +1,49 @@
-import {NextResponse} from "next/server";
-import {auth} from "@clerk/nextjs/server";
-import {db} from "@/lib/db";
+import { NextResponse } from "next/server";
+import { auth } from "@clerk/nextjs/server";
+import { db } from "@/lib/db";
export async function DELETE(
req: Request,
- {params}: {params: {courseId:string,attachmentId:string}}
-){
+ context: { params: { courseId: string; attachmentId: string } }
+) {
try {
- const {userId} = await auth()
+ const { params } = context; // ✅ Извлекаем params явно
+ console.log("📌 params:", params);
+
+ if (!params?.courseId || !params?.attachmentId) {
+ return NextResponse.json({ error: "Invalid parameters" }, { status: 400 });
+ }
+
+ // Получаем userId
+ const { userId } = await auth();
if (!userId) {
- return new NextResponse('Unauthorized', {status: 401})
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
+
+ // Проверяем, является ли пользователь владельцем курса
const courseOwner = await db.course.findUnique({
- where: {
- id: params.courseId,
- userId: userId
- }
- })
+ where: { id: params.courseId, userId },
+ });
if (!courseOwner) {
- return new NextResponse('Unautorized', {status: 401})
+ return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
+
+ // Проверяем, существует ли вложение перед удалением
+ const attachmentExists = await db.attachment.findUnique({
+ where: { id: params.attachmentId },
+ });
+ if (!attachmentExists) {
+ return NextResponse.json({ error: "Attachment not found" }, { status: 404 });
+ }
+
+ // Удаляем вложение
const attachment = await db.attachment.delete({
- where: {
- courseId: params.courseId,
- id: params.attachmentId,
- }
- })
+ where: { id: params.attachmentId },
+ });
- return NextResponse.json(attachment)
- }
- catch (error) {
- console.error('ATTACHMENT_ID', error);
- return new NextResponse('Internal server error', {status:500});
+ return NextResponse.json({ message: "Attachment deleted", attachment });
+ } catch (error) {
+ console.error("❌ ATTACHMENT_ID ERROR:", error);
+ return NextResponse.json({ error: "Internal Server Error" }, { status: 500 });
}
-}
\ No newline at end of file
+}
From a4ec35fdbd9342c838cd892bb580309a73340e4c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:38:54 +0600
Subject: [PATCH 280/706] some bugging in route ts attachment
---
.../{[attachementId] => [attachementsId]}/route.ts | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
rename src/app/api/courses/[courseId]/attachments/{[attachementId] => [attachementsId]}/route.ts (87%)
diff --git a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts b/src/app/api/courses/[courseId]/attachments/[attachementsId]/route.ts
similarity index 87%
rename from src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
rename to src/app/api/courses/[courseId]/attachments/[attachementsId]/route.ts
index 90857f3..b4a5463 100644
--- a/src/app/api/courses/[courseId]/attachments/[attachementId]/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/[attachementsId]/route.ts
@@ -4,10 +4,11 @@ import { db } from "@/lib/db";
export async function DELETE(
req: Request,
- context: { params: { courseId: string; attachmentId: string } }
+ context: { params?: { courseId?: string; attachmentId?: string } } // ✅ Оборачиваем параметры в `?`
) {
try {
- const { params } = context; // ✅ Извлекаем params явно
+ const params = context.params; // ✅ Извлекаем `params`
+
console.log("📌 params:", params);
if (!params?.courseId || !params?.attachmentId) {
@@ -15,7 +16,7 @@ export async function DELETE(
}
// Получаем userId
- const { userId } = await auth();
+ const { userId } =await auth();
if (!userId) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
From a64f229e4664585df0a4e5a448d4007376b5b3bf Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:51:11 +0600
Subject: [PATCH 281/706] some bugging in route ts attachment
---
.../{[attachementsId] => [attachmentId]}/route.ts | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
rename src/app/api/courses/[courseId]/attachments/{[attachementsId] => [attachmentId]}/route.ts (84%)
diff --git a/src/app/api/courses/[courseId]/attachments/[attachementsId]/route.ts b/src/app/api/courses/[courseId]/attachments/[attachmentId]/route.ts
similarity index 84%
rename from src/app/api/courses/[courseId]/attachments/[attachementsId]/route.ts
rename to src/app/api/courses/[courseId]/attachments/[attachmentId]/route.ts
index b4a5463..38a3191 100644
--- a/src/app/api/courses/[courseId]/attachments/[attachementsId]/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/[attachmentId]/route.ts
@@ -7,16 +7,16 @@ export async function DELETE(
context: { params?: { courseId?: string; attachmentId?: string } } // ✅ Оборачиваем параметры в `?`
) {
try {
- const params = context.params; // ✅ Извлекаем `params`
+ const { params } = context; // ✅ Извлекаем `params`
- console.log("📌 params:", params);
+ console.log("📌 Received params:", params); // Для отладки
if (!params?.courseId || !params?.attachmentId) {
return NextResponse.json({ error: "Invalid parameters" }, { status: 400 });
}
- // Получаем userId
- const { userId } =await auth();
+ // Получаем userId из auth
+ const { userId } = await auth();
if (!userId) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
@@ -25,6 +25,7 @@ export async function DELETE(
const courseOwner = await db.course.findUnique({
where: { id: params.courseId, userId },
});
+
if (!courseOwner) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
@@ -33,6 +34,7 @@ export async function DELETE(
const attachmentExists = await db.attachment.findUnique({
where: { id: params.attachmentId },
});
+
if (!attachmentExists) {
return NextResponse.json({ error: "Attachment not found" }, { status: 404 });
}
@@ -44,7 +46,7 @@ export async function DELETE(
return NextResponse.json({ message: "Attachment deleted", attachment });
} catch (error) {
- console.error("❌ ATTACHMENT_ID ERROR:", error);
+ console.error("❌ ATTACHMENTS_ID ERROR:", error);
return NextResponse.json({ error: "Internal Server Error" }, { status: 500 });
}
}
From 67be501a41da70bf4a72f8b9569ece23986bfe65 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 08:52:24 +0600
Subject: [PATCH 282/706] some bugging in route ts attachment
---
.../attachments/[attachmentId]/route.ts | 64 +++++++------------
1 file changed, 24 insertions(+), 40 deletions(-)
diff --git a/src/app/api/courses/[courseId]/attachments/[attachmentId]/route.ts b/src/app/api/courses/[courseId]/attachments/[attachmentId]/route.ts
index 38a3191..702e5ab 100644
--- a/src/app/api/courses/[courseId]/attachments/[attachmentId]/route.ts
+++ b/src/app/api/courses/[courseId]/attachments/[attachmentId]/route.ts
@@ -1,52 +1,36 @@
-import { NextResponse } from "next/server";
-import { auth } from "@clerk/nextjs/server";
-import { db } from "@/lib/db";
+import {NextResponse} from "next/server";
+import {auth} from "@clerk/nextjs/server";
+import {db} from "@/lib/db";
export async function DELETE(
req: Request,
- context: { params?: { courseId?: string; attachmentId?: string } } // ✅ Оборачиваем параметры в `?`
-) {
+ {params}: {params: {courseId:string,attachmentId:string}}
+){
try {
- const { params } = context; // ✅ Извлекаем `params`
-
- console.log("📌 Received params:", params); // Для отладки
-
- if (!params?.courseId || !params?.attachmentId) {
- return NextResponse.json({ error: "Invalid parameters" }, { status: 400 });
- }
-
- // Получаем userId из auth
- const { userId } = await auth();
+ const {userId} = await auth()
if (!userId) {
- return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ return new NextResponse('Unauthorized', {status: 401})
}
-
- // Проверяем, является ли пользователь владельцем курса
const courseOwner = await db.course.findUnique({
- where: { id: params.courseId, userId },
- });
-
+ where: {
+ id: params.courseId,
+ userId: userId
+ }
+ })
if (!courseOwner) {
- return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
+ return new NextResponse('Unautorized', {status: 401})
}
-
- // Проверяем, существует ли вложение перед удалением
- const attachmentExists = await db.attachment.findUnique({
- where: { id: params.attachmentId },
- });
-
- if (!attachmentExists) {
- return NextResponse.json({ error: "Attachment not found" }, { status: 404 });
- }
-
- // Удаляем вложение
const attachment = await db.attachment.delete({
- where: { id: params.attachmentId },
- });
+ where: {
+ courseId: params.courseId,
+ id: params.attachmentId,
+ }
+ })
- return NextResponse.json({ message: "Attachment deleted", attachment });
- } catch (error) {
- console.error("❌ ATTACHMENTS_ID ERROR:", error);
- return NextResponse.json({ error: "Internal Server Error" }, { status: 500 });
+ return NextResponse.json(attachment)
+ }
+ catch (error) {
+ console.error('ATTACHMENT_ID', error);
+ return new NextResponse('Internal server error', {status:500});
}
-}
+}
\ No newline at end of file
From a30934f475af3fb92b3674aa5aec4a4e26fb78eb Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 09:04:10 +0600
Subject: [PATCH 283/706] let s ahead and i now customixe schema prisma
crreating model Chapter
---
prisma/schema.prisma | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 18607e0..503941c 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -39,5 +39,15 @@ model Attachment {
createdAt DateTime @default(now())
updateAt DateTime @updatedAt
+ @@index([courseId])
@@map("attachments")
}
+
+model Chapter {
+ id String @id @default(cuid())
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ title String
+
+
+}
From e98f8ad199a878d56e6114bf1500b90997c11b58 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 09:05:21 +0600
Subject: [PATCH 284/706] let s ahead and i now customixe schema prisma
crreating model Chapter
---
prisma/schema.prisma | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 503941c..5d71111 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -44,10 +44,12 @@ model Attachment {
}
model Chapter {
- id String @id @default(cuid())
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
- title String
-
-
+ id String @id @default(cuid())
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ title String
+ position String
+ videoUrl String
+ isPublished String
+ isFree Boolean @default(false)
}
From d570ed6db005f4a99b370789b91f5bff67d32ffb Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 09:08:42 +0600
Subject: [PATCH 285/706] let s ahead and i now customixe schema prisma
crreating model Chapter
---
prisma/schema.prisma | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 5d71111..acea1f7 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -20,6 +20,7 @@ model Course {
createdAt DateTime @default(now())
updateAt DateTime @updatedAt
Category Category? @relation(fields: [categoryId], references: [id])
+ chapters Chapter[]
@@map("courses")
}
@@ -38,6 +39,7 @@ model Attachment {
courseId String?
createdAt DateTime @default(now())
updateAt DateTime @updatedAt
+ courseiD
@@index([courseId])
@@map("attachments")
@@ -52,4 +54,7 @@ model Chapter {
videoUrl String
isPublished String
isFree Boolean @default(false)
+ muxData MuxData?
+ courseId String
+ course Course @relation(fields: [courseId], references: [id], onDelete: Cascade)
}
From ed3c2ddfb0239348098ed859be93040dcb80c9e1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:13:49 +0600
Subject: [PATCH 286/706] now i sarting again
---
prisma/schema.prisma | 1 +
1 file changed, 1 insertion(+)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index acea1f7..28374f4 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -57,4 +57,5 @@ model Chapter {
muxData MuxData?
courseId String
course Course @relation(fields: [courseId], references: [id], onDelete: Cascade)
+ use
}
From 8888fc6590aca845e89d7258c0bd30e4ccaeb723 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:24:17 +0600
Subject: [PATCH 287/706] ok now i am starting building a model muxdata
---
prisma/schema.prisma | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 28374f4..36b9a8f 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -46,16 +46,22 @@ model Attachment {
}
model Chapter {
- id String @id @default(cuid())
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
- title String
- position String
- videoUrl String
- isPublished String
- isFree Boolean @default(false)
- muxData MuxData?
- courseId String
- course Course @relation(fields: [courseId], references: [id], onDelete: Cascade)
- use
+ id String @id @default(cuid())
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ title String
+ position String
+ videoUrl String
+ isPublished String
+ isFree Boolean @default(false)
+ muxData MuxData?
+ courseId String
+ course Course @relation(fields: [courseId], references: [id], onDelete: Cascade)
+ userPostgress UserProgress[]
}
+
+
+model MuxData{
+
+}
+
From db88f7870870d649240d8155347d88f0bf5101ef Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:25:11 +0600
Subject: [PATCH 288/706] ok now i am starting building a model muxdata
---
prisma/schema.prisma | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 36b9a8f..2fefe65 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -60,8 +60,8 @@ model Chapter {
userPostgress UserProgress[]
}
-
-model MuxData{
-
+model MuxData {
+ id String @id @default(cuid())
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
}
-
From 9bc2eed58db17fba0025985d54505398a00417d2 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:26:34 +0600
Subject: [PATCH 289/706] ok now i am starting building a model muxdata
---
prisma/schema.prisma | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 2fefe65..b2c663d 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -64,4 +64,8 @@ model MuxData {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
+
+ playbackId String?
+ chapterId String @unique
+ chapter Chapter @relation(fields: [chapterId], references: [id], onDelete: Cascade)
}
From 92508fab3cbe6d67af3d3f24b02ac52f8c96c7dc Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:27:56 +0600
Subject: [PATCH 290/706] ok now i am starting building a model muxdata
---
prisma/schema.prisma | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index b2c663d..cbdce14 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -39,7 +39,6 @@ model Attachment {
courseId String?
createdAt DateTime @default(now())
updateAt DateTime @updatedAt
- courseiD
@@index([courseId])
@@map("attachments")
@@ -69,3 +68,10 @@ model MuxData {
chapterId String @unique
chapter Chapter @relation(fields: [chapterId], references: [id], onDelete: Cascade)
}
+
+model UserProgress {
+ id String @id @default(cuid())
+
+ Chapter Chapter? @relation(fields: [chapterId], references: [id])
+ chapterId String?
+}
From 0a5c6a7dbb96a3f5a26521118559a2d782d43aa0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:31:06 +0600
Subject: [PATCH 291/706] ok now i am starting building a model muxdata
---
prisma/schema.prisma | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index cbdce14..90c2a79 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -70,8 +70,13 @@ model MuxData {
}
model UserProgress {
- id String @id @default(cuid())
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ id String @id @default(cuid())
+ isCompleted Boolean @default(false)
+ chapter Chapter @relation(fields: [chapterId], references: [id], onDelete: Cascade)
+ chapterId String
- Chapter Chapter? @relation(fields: [chapterId], references: [id])
- chapterId String?
+ @@unique([userId, chapterId])
+ @@index([chapterId])
}
From 9204c4f5d33f3ac77e2012b2cc79fdb71213c3b7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:32:54 +0600
Subject: [PATCH 292/706] ok now i am starting building a model muxdata
---
prisma/schema.prisma | 1 +
1 file changed, 1 insertion(+)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 90c2a79..373325c 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -76,6 +76,7 @@ model UserProgress {
isCompleted Boolean @default(false)
chapter Chapter @relation(fields: [chapterId], references: [id], onDelete: Cascade)
chapterId String
+ userId String
@@unique([userId, chapterId])
@@index([chapterId])
From 6beeffe00688299f1aad616d00e543d66d73d841 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:34:33 +0600
Subject: [PATCH 293/706] ok now i am starting building a model muxdata
---
prisma/schema.prisma | 3 +++
1 file changed, 3 insertions(+)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 373325c..f8bdf94 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -57,6 +57,8 @@ model Chapter {
courseId String
course Course @relation(fields: [courseId], references: [id], onDelete: Cascade)
userPostgress UserProgress[]
+
+ @@index([courseId])
}
model MuxData {
@@ -81,3 +83,4 @@ model UserProgress {
@@unique([userId, chapterId])
@@index([chapterId])
}
+model
\ No newline at end of file
From 9dd60b5d4f9abb98f787d0f875e3d7cb976f727b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:44:21 +0600
Subject: [PATCH 294/706] new model StripeCustomer
---
prisma/schema.prisma | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index f8bdf94..3b6fb1e 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -21,6 +21,7 @@ model Course {
updateAt DateTime @updatedAt
Category Category? @relation(fields: [categoryId], references: [id])
chapters Chapter[]
+ purchase Purchase[]
@@map("courses")
}
@@ -83,4 +84,14 @@ model UserProgress {
@@unique([userId, chapterId])
@@index([chapterId])
}
-model
\ No newline at end of file
+
+model Purchase {
+ id String @id @default(cuid())
+ userId String
+ courseId String
+ Course Course @relation(fields: [courseId], references: [id])
+
+ @@index([courseId])
+}
+
+model
From 9935ddc282ab62794045377c587e65c5a1dfcadf Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:45:59 +0600
Subject: [PATCH 295/706] new model StripeCustomer
---
prisma/schema.prisma | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 3b6fb1e..9cf99f5 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -94,4 +94,10 @@ model Purchase {
@@index([courseId])
}
-model
+model StripeCustomer {
+ id String @id @default(cuid())
+ userId String @unique
+ stripeCustomer String @unique
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+}
From f43a8f2096bd8f73e07362e55111268e202ce846 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:50:53 +0600
Subject: [PATCH 296/706] now creating new Chapter form
---
.../[courseId]/components/ChapterForm.tsx | 94 +++++++++++++++++++
.../teacher/courses/[courseId]/page.tsx | 2 +-
2 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
new file mode 100644
index 0000000..6e50b5f
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -0,0 +1,94 @@
+"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";
+import { Textarea } from "@/components/ui/textarea";
+import { cn } from "@/lib/utils";
+import {Course} from "@prisma/client";
+
+const formSchema = z.object({
+ description: z.string().min(1, "Description is required"),
+});
+
+interface DescriptionFormProps {
+ initialData:Course
+ courseId: string;
+}
+
+export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => {
+ const [isEditing, setIsEditing] = useState(false);
+ const router = useRouter();
+
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ description: initialData?.description || ""
+ },
+ });
+
+ const { isSubmitting, isDirty } = form.formState;
+ 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 Description
+
+ {isEditing ? <>Cancel> : <> Edit Description>}
+
+
+
+ {
+ !isEditing && (
+
+ {initialData.description || 'No description'}
+
+ )}
+ {isEditing && (
+
+
+ (
+
+
+
+
+
+
+ )}
+ />
+
+
+ Save
+
+
+
+
+ )}
+
+ );
+};
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 bb699a3..b317c2c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -79,6 +79,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
Course chapters
+
TODO: Chapters
@@ -90,7 +91,6 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
- {/* ✅ Теперь Resource Attachment в правильном месте */}
From 56832ac6bb1d0882d3daaa6f1ce2a3a68cac688f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 10:54:48 +0600
Subject: [PATCH 297/706] customize courseiD/page
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 4 ++--
.../(routes)/teacher/courses/[courseId]/page.tsx | 8 +++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 6e50b5f..cfbcc4b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -18,12 +18,12 @@ const formSchema = z.object({
description: z.string().min(1, "Description is required"),
});
-interface DescriptionFormProps {
+interface ChapterFormProps {
initialData:Course
courseId: string;
}
-export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps) => {
+export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
const [isEditing, setIsEditing] = useState(false);
const router = useRouter();
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 b317c2c..eb254f4 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -9,6 +9,7 @@ import { ImageForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses
import { CategoryForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/CategoryForm";
import { PriceForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/PriceForm";
import { AttachmentForm } from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/AttachmentForm";
+import {ChapterForm} from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm";
const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) => {
const { userId } = await auth();
@@ -19,6 +20,11 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
const course = await db.course.findUnique({
where: { id: params.courseId },
include: {
+ chapters:{
+ orderBy:{
+ position: 'asc'
+ }
+ },
attachments: {
orderBy: {
createdAt: "desc",
@@ -79,7 +85,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
Course chapters
-
+
TODO: Chapters
From 2402c89e02a339cd1e725c8281eef39fcc93dd3e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 23:01:34 +0600
Subject: [PATCH 298/706] i am tired but idk i starting again and again while
until i win!!!!!!!!!!!!!
---
.../(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx | 1 +
1 file changed, 1 insertion(+)
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 eb254f4..21778d0 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx
@@ -45,6 +45,7 @@ const CourseIdPagePage = async ({ params }: { params: { courseId: string } }) =>
course.imageUrl,
course.price,
course.categoryId,
+ course.chapters.some(chapter => chapter.isPublished) ,
];
const totalFields = requiredFields.length;
const completedFields = requiredFields.filter(Boolean).length;
From 5e5fb266583cef579ae0211ccbe6ecb0011ce633 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 23:03:02 +0600
Subject: [PATCH 299/706] i am tired but idk i starting again and again while
until i win!!!!!!!!!!!!!
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index cfbcc4b..603094d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -15,7 +15,7 @@ import { cn } from "@/lib/utils";
import {Course} from "@prisma/client";
const formSchema = z.object({
- description: z.string().min(1, "Description is required"),
+ title: z.string().min(1),
});
interface ChapterFormProps {
@@ -30,7 +30,7 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- description: initialData?.description || ""
+ title: initialData?.description || ""
},
});
@@ -71,7 +71,7 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
(
From 181d64f1554fb6bdcc4053166e31fdc39acb8135 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 23:04:18 +0600
Subject: [PATCH 300/706] i am tired but idk i starting again and again while
until i win!!!!!!!!!!!!!
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 603094d..6058bbd 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -24,7 +24,8 @@ interface ChapterFormProps {
}
export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
- const [isEditing, setIsEditing] = useState(false);
+ const [isCreating,setIsCreating] = useState(false);
+ const [Isupdating, setIsupdating] = useState(false);
const router = useRouter();
const form = useForm>({
From ca97372d3ef8929f75fcc5fc7ce116b47224ac57 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 23:06:29 +0600
Subject: [PATCH 301/706] i am tired but idk i starting again and again while
until i win!!!!!!!!!!!!!
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 6058bbd..0b0dd31 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -7,7 +7,6 @@ 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";
import { Textarea } from "@/components/ui/textarea";
@@ -31,13 +30,14 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
- title: initialData?.description || ""
+ title: ""
},
});
const { isSubmitting, isDirty } = form.formState;
- const toggleEdit = () => setIsEditing((current) => !current);
-
+ const toggleCreating = () => {
+ setIsCreating((current) => !current);
+ }
const onSubmit = async (values: z.infer) => {
try {
await axios.patch(`/api/courses/${courseId}`, values);
From 6585a872cbd1dcc5fa13df2a9c6acf61ae76d556 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 23:07:23 +0600
Subject: [PATCH 302/706] i am tired but idk i starting again and again while
until i win!!!!!!!!!!!!!
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 0b0dd31..d074884 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -40,9 +40,9 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
}
const onSubmit = async (values: z.infer) => {
try {
- await axios.patch(`/api/courses/${courseId}`, values);
- toast.success("Course updated!");
- toggleEdit();
+ await axios.patch(`/api/courses/${courseId}/chapters`, values);
+ toast.success("Chapter created!");
+ toggleCreating();
router.refresh();
} catch (error) {
console.error("Ошибка при обновлении курса:", error);
From a3abfe3ede51be43c0d6782dbf18377119992d41 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 23:08:34 +0600
Subject: [PATCH 303/706] i am tired but idk i starting again and again while
until i win!!!!!!!!!!!!!
---
.../courses/[courseId]/components/ChapterForm.tsx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index d074884..f02693b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -4,7 +4,7 @@ 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 {Pencil, PlusCircle} from "lucide-react";
import { Button } from "@/components/ui/button";
import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form";
import toast from "react-hot-toast";
@@ -53,13 +53,13 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
Course Description
-
- {isEditing ? <>Cancel> : <> Edit Description>}
+
+ {isCreating ? <>Cancel> : <> Add a chapter>}
{
- !isEditing && (
+ !isCreating && (
{
{initialData.description || 'No description'}
)}
- {isEditing && (
+ {isCreating && (
Date: Thu, 13 Feb 2025 23:46:32 +0600
Subject: [PATCH 304/706] chapters customize
---
.../[courseId]/components/ChapterForm.tsx | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index f02693b..7f38c9e 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -12,6 +12,7 @@ import { useRouter } from "next/navigation";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
import {Course} from "@prisma/client";
+import {Input} from "@/components/ui/input";
const formSchema = z.object({
title: z.string().min(1),
@@ -52,7 +53,7 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
return (
- Course Description
+ Chapter Customize
{isCreating ? <>Cancel> : <> Add a chapter>}
@@ -64,7 +65,7 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
'text-sm mt-2',
!initialData.description ? 'text-slate-500 italic' : ''
)}>
- {initialData.description || 'No description'}
+ {initialData.description || 'No chapters'}
)}
{isCreating && (
@@ -76,20 +77,31 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
render={({ field }) => (
-
+
)}
/>
-
- Save
+ Create
-
)}
+ {
+ !isCreating &&(
+
+
+ No Chapters
+
+ )}
+ {
+ !isCreating &&(
+
+
+ )
+ }
);
};
From cb4e1d92542c3c26dff7a4bcf588e27f397a925f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Thu, 13 Feb 2025 23:52:25 +0600
Subject: [PATCH 305/706] customize still
---
.../[courseId]/components/ChapterForm.tsx | 25 +++++++------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 7f38c9e..3ef0da8 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -9,9 +9,8 @@ import { Button } from "@/components/ui/button";
import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
-import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/lib/utils";
-import {Course} from "@prisma/client";
+import {Chapter, Course} from "@prisma/client";
import {Input} from "@/components/ui/input";
const formSchema = z.object({
@@ -19,7 +18,7 @@ const formSchema = z.object({
});
interface ChapterFormProps {
- initialData:Course
+ initialData:Course &{chapters:Chapter[]},
courseId: string;
}
@@ -58,16 +57,6 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
{isCreating ? <>Cancel> : <> Add a chapter>}
-
- {
- !isCreating && (
-
- {initialData.description || 'No chapters'}
-
- )}
{isCreating && (
@@ -91,15 +80,19 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
)}
{
!isCreating &&(
-
+
No Chapters
)}
{
!isCreating &&(
-
-
+
+ Drag and drop to reorder the chapters
+
)
}
From 46f7f555fe8e2ec2a3e0bae824900feae96e4f8f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 00:32:26 +0600
Subject: [PATCH 306/706] fixed some style bug
---
.../[courseId]/components/ChapterForm.tsx | 49 ++++++++-----------
1 file changed, 21 insertions(+), 28 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 3ef0da8..af843b8 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -1,29 +1,28 @@
-"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, PlusCircle} from "lucide-react";
+import { Pencil, PlusCircle } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form";
import toast from "react-hot-toast";
import { useRouter } from "next/navigation";
import { cn } from "@/lib/utils";
-import {Chapter, Course} from "@prisma/client";
-import {Input} from "@/components/ui/input";
+import { Chapter, Course } from "@prisma/client";
+import { Input } from "@/components/ui/input";
const formSchema = z.object({
title: z.string().min(1),
});
interface ChapterFormProps {
- initialData:Course &{chapters:Chapter[]},
+ initialData: Course & { chapters: Chapter[] };
courseId: string;
}
export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
- const [isCreating,setIsCreating] = useState(false);
+ const [isCreating, setIsCreating] = useState(false);
const [Isupdating, setIsupdating] = useState(false);
const router = useRouter();
@@ -36,8 +35,9 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
const { isSubmitting, isDirty } = form.formState;
const toggleCreating = () => {
- setIsCreating((current) => !current);
+ setIsCreating((current) => !current);
}
+
const onSubmit = async (values: z.infer) => {
try {
await axios.patch(`/api/courses/${courseId}/chapters`, values);
@@ -54,7 +54,7 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
Chapter Customize
- {isCreating ? <>Cancel> : <> Add a chapter>}
+ {isCreating ? <>Cancel> : <> Add a chapter>}
{isCreating && (
@@ -72,29 +72,22 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
)}
/>
-
- Create
-
+
+ Create
+
)}
- {
- !isCreating &&(
-
-
- No Chapters
-
- )}
- {
- !isCreating &&(
-
- Drag and drop to reorder the chapters
-
- )
- }
+ {!isCreating && (
+
+ {!initialData.chapters.length ? 'No chapters' : ''}
+
+ )}
+ {!isCreating && (
+
+ Drag and drop to reorder the chapters
+
+ )}
);
};
From 77166635dd7bdab02b4ecfb14cf78da5ff250f4d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 00:36:43 +0600
Subject: [PATCH 307/706] customize chapter route ts
---
.../[courseId]/components/ChapterForm.tsx | 1 +
.../api/courses/[courseId]/chapters/route.ts | 36 +++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 src/app/api/courses/[courseId]/chapters/route.ts
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index af843b8..195b5fe 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -1,3 +1,4 @@
+'use client'
import React, { useState } from "react";
import * as z from "zod";
import { useForm } from "react-hook-form";
diff --git a/src/app/api/courses/[courseId]/chapters/route.ts b/src/app/api/courses/[courseId]/chapters/route.ts
new file mode 100644
index 0000000..3225648
--- /dev/null
+++ b/src/app/api/courses/[courseId]/chapters/route.ts
@@ -0,0 +1,36 @@
+import { NextResponse } from "next/server";
+import {auth} from "@clerk/nextjs/server";
+import {db} from "@/lib/db";
+
+export async function POST(req: Request, { params }: { params: { courseId: string } }) {
+ try {
+ const { userId } = await auth();
+ const { url } = await req.json();
+
+ if (!userId) {
+ return new NextResponse('Unauthorized', { status: 401 });
+ }
+
+ const courseOwner = await db.course.findUnique({ where: { id: params.courseId } });
+ if (!courseOwner) {
+ return new NextResponse('Not Found', { status: 404 });
+ }
+
+ const fileName = url.split('/').pop();
+ if (!fileName) {
+ return new NextResponse('Invalid file URL', { status: 400 });
+ }
+
+ const attachment = await db.attachment.create({
+ data: {
+ url,
+ name: fileName,
+ courseId: params.courseId,
+ }
+ });
+ return NextResponse.json(attachment);
+ } catch (err) {
+ console.log('COURSE_ID_ATTACHMENTS', err);
+ return new NextResponse('Internal server error', { status: 500 });
+ }
+}
From a34cee292bf7c5ebf5b371393344aa1206ab777e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 00:41:18 +0600
Subject: [PATCH 308/706] customize chapter route ts
---
src/app/api/courses/[courseId]/chapters/route.ts | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/api/courses/[courseId]/chapters/route.ts b/src/app/api/courses/[courseId]/chapters/route.ts
index 3225648..121531f 100644
--- a/src/app/api/courses/[courseId]/chapters/route.ts
+++ b/src/app/api/courses/[courseId]/chapters/route.ts
@@ -11,11 +11,13 @@ export async function POST(req: Request, { params }: { params: { courseId: strin
return new NextResponse('Unauthorized', { status: 401 });
}
- const courseOwner = await db.course.findUnique({ where: { id: params.courseId } });
+ const courseOwner = await db.course.findUnique({ where: { id: params.courseId,userId: userId } });
if (!courseOwner) {
- return new NextResponse('Not Found', { status: 404 });
+ return new NextResponse('Unauthorized', { status: 401 });
}
+
+const lastChapter = await db.chapter
const fileName = url.split('/').pop();
if (!fileName) {
return new NextResponse('Invalid file URL', { status: 400 });
From 565409e36d4c94c34c018818979cc6d0bd490691 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 15:33:47 +0600
Subject: [PATCH 309/706] now i am again starting
---
src/app/api/courses/[courseId]/chapters/route.ts | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/app/api/courses/[courseId]/chapters/route.ts b/src/app/api/courses/[courseId]/chapters/route.ts
index 121531f..1aa8c76 100644
--- a/src/app/api/courses/[courseId]/chapters/route.ts
+++ b/src/app/api/courses/[courseId]/chapters/route.ts
@@ -16,12 +16,10 @@ export async function POST(req: Request, { params }: { params: { courseId: strin
return new NextResponse('Unauthorized', { status: 401 });
}
+const lastChapter = await db.chapter.findFirst({
-const lastChapter = await db.chapter
- const fileName = url.split('/').pop();
- if (!fileName) {
- return new NextResponse('Invalid file URL', { status: 400 });
- }
+
+})
const attachment = await db.attachment.create({
data: {
From bb58a06b948840bf762263c31d1591eb8162048f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 15:37:12 +0600
Subject: [PATCH 310/706] now i am again starting
---
.../api/courses/[courseId]/chapters/route.ts | 45 ++++++++++---------
1 file changed, 25 insertions(+), 20 deletions(-)
diff --git a/src/app/api/courses/[courseId]/chapters/route.ts b/src/app/api/courses/[courseId]/chapters/route.ts
index 1aa8c76..87bc936 100644
--- a/src/app/api/courses/[courseId]/chapters/route.ts
+++ b/src/app/api/courses/[courseId]/chapters/route.ts
@@ -4,32 +4,37 @@ import {db} from "@/lib/db";
export async function POST(req: Request, { params }: { params: { courseId: string } }) {
try {
- const { userId } = await auth();
- const { url } = await req.json();
+ const {userId} = await auth();
+ const {url} = await req.json();
- if (!userId) {
- return new NextResponse('Unauthorized', { status: 401 });
- }
+ if (!userId) {
+ return new NextResponse('Unauthorized', {status: 401});
+ }
- const courseOwner = await db.course.findUnique({ where: { id: params.courseId,userId: userId } });
- if (!courseOwner) {
- return new NextResponse('Unauthorized', { status: 401 });
- }
+ const courseOwner = await db.course.findUnique({where: {id: params.courseId, userId: userId}});
+ if (!courseOwner) {
+ return new NextResponse('Unauthorized', {status: 401});
+ }
-const lastChapter = await db.chapter.findFirst({
+ const lastChapter = await db.chapter.findFirst({
+ where: {courseId: params.courseId},
+ orderBy: {
+ position: 'desc'
+ },
+ });
+const newPosition = lastChapter ? lastChapter.position+ 1 : 1 ;
-})
+const chapter = await db.chapter.create({
+ data: {
+ title,
+ courseId: params.courseId
- const attachment = await db.attachment.create({
- data: {
- url,
- name: fileName,
- courseId: params.courseId,
- }
- });
- return NextResponse.json(attachment);
- } catch (err) {
+ }
+
+
+})
+ }catch (err) {
console.log('COURSE_ID_ATTACHMENTS', err);
return new NextResponse('Internal server error', { status: 500 });
}
From 503966b5eeb00c07ad1daf7c8168a67250132b4c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 15:40:32 +0600
Subject: [PATCH 311/706] customize route chapter
---
.../api/courses/[courseId]/chapters/route.ts | 72 +++++++++----------
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/app/api/courses/[courseId]/chapters/route.ts b/src/app/api/courses/[courseId]/chapters/route.ts
index 87bc936..6cf2a14 100644
--- a/src/app/api/courses/[courseId]/chapters/route.ts
+++ b/src/app/api/courses/[courseId]/chapters/route.ts
@@ -1,41 +1,41 @@
import { NextResponse } from "next/server";
-import {auth} from "@clerk/nextjs/server";
-import {db} from "@/lib/db";
+import { auth } from "@clerk/nextjs/server";
+import { db } from "@/lib/db";
export async function POST(req: Request, { params }: { params: { courseId: string } }) {
- try {
- const {userId} = await auth();
- const {url} = await req.json();
-
- if (!userId) {
- return new NextResponse('Unauthorized', {status: 401});
- }
-
- const courseOwner = await db.course.findUnique({where: {id: params.courseId, userId: userId}});
- if (!courseOwner) {
- return new NextResponse('Unauthorized', {status: 401});
- }
-
- const lastChapter = await db.chapter.findFirst({
- where: {courseId: params.courseId},
- orderBy: {
- position: 'desc'
- },
- });
-const newPosition = lastChapter ? lastChapter.position+ 1 : 1 ;
-
-
-const chapter = await db.chapter.create({
- data: {
- title,
- courseId: params.courseId
-
+ try {
+ const { userId } = await auth();
+ const { url, title } = await req.json();
+
+ if (!userId) {
+ return new NextResponse('Unauthorized', { status: 401 });
+ }
+
+ const courseOwner = await db.course.findUnique({
+ where: { id: params.courseId, userId: userId }
+ });
+ if (!courseOwner) {
+ return new NextResponse('Unauthorized', { status: 401 });
+ }
+
+ const lastChapter = await db.chapter.findFirst({
+ where: { courseId: params.courseId },
+ orderBy: { position: 'desc' },
+ });
+
+ const newPosition = lastChapter ? lastChapter.position + 1 : 1;
+
+ const chapter = await db.chapter.create({
+ data: {
+ title,
+ courseId: params.courseId,
+ position: newPosition,
+ }
+ });
+
+ return NextResponse.json(chapter);
+ } catch (err) {
+ console.log('[CHAPTERS]', err);
+ return new NextResponse('Internal server error', { status: 500 });
}
-
-
-})
- }catch (err) {
- console.log('COURSE_ID_ATTACHMENTS', err);
- return new NextResponse('Internal server error', { status: 500 });
- }
}
From 8a109279859959793abb48e6a86d827c25aeb23b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 15:47:13 +0600
Subject: [PATCH 312/706] rename prisma schema changed
---
prisma/schema.prisma | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 9cf99f5..c845897 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -50,8 +50,9 @@ model Chapter {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
title String
- position String
- videoUrl String
+ position Int
+ description String? @db.Text
+ videoUrl String? @db.Text
isPublished String
isFree Boolean @default(false)
muxData MuxData?
From 0b2e48b7c2f0717bbcf23c393f5e45d1b3449598 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 16:21:57 +0600
Subject: [PATCH 313/706] changed schema
---
prisma/schema.prisma | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index c845897..2831cbd 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -53,7 +53,7 @@ model Chapter {
position Int
description String? @db.Text
videoUrl String? @db.Text
- isPublished String
+ isPublished String?
isFree Boolean @default(false)
muxData MuxData?
courseId String
From a0385793e24be18efbfdb9a3369d18e66388f92b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 16:25:05 +0600
Subject: [PATCH 314/706] customixe fixing bug
---
src/app/api/courses/[courseId]/route.ts | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/app/api/courses/[courseId]/route.ts b/src/app/api/courses/[courseId]/route.ts
index bee4f99..c551551 100644
--- a/src/app/api/courses/[courseId]/route.ts
+++ b/src/app/api/courses/[courseId]/route.ts
@@ -11,21 +11,19 @@ export async function PATCH(req: Request, { params }: { params: { courseId: stri
return new NextResponse("Unauthorized", { status: 401 });
}
- // Parse the request body to get the updated course data
const values = await req.json();
- // 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
+ userId,
},
data: {
- ...values, // Update with the new values passed from the request
+ ...values,
},
});
- return NextResponse.json(course); // Return the updated course data
+ return NextResponse.json(course);
} catch (error) {
console.log("[COURSE_ID]", error);
return new NextResponse("Internal server error", { status: 500 });
From 6ee2ed40298eb61bcf0e739b76e00d10c77f1089 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 16:31:48 +0600
Subject: [PATCH 315/706] fixed bug^^
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 195b5fe..26e9743 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -41,7 +41,7 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
const onSubmit = async (values: z.infer) => {
try {
- await axios.patch(`/api/courses/${courseId}/chapters`, values);
+ await axios.post(`/api/courses/${courseId}/chapters`, values);
toast.success("Chapter created!");
toggleCreating();
router.refresh();
From 785c682e6361a68f439ac2c6010b8bb970a97d07 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 16:39:28 +0600
Subject: [PATCH 316/706] customize chapterlist page
---
.../[courseId]/components/ChapterForm.tsx | 6 ++++--
.../[courseId]/components/ChapterList.tsx | 19 +++++++++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 26e9743..42ef557 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -12,6 +12,7 @@ import { useRouter } from "next/navigation";
import { cn } from "@/lib/utils";
import { Chapter, Course } from "@prisma/client";
import { Input } from "@/components/ui/input";
+import ChapterList from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList";
const formSchema = z.object({
title: z.string().min(1),
@@ -81,12 +82,13 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
)}
{!isCreating && (
- {!initialData.chapters.length ? 'No chapters' : ''}
+ {!initialData.chapters.length ? 'No chapters' : ''}
+ {}} onReorder={} items={initialData.chapters || []} />
)}
{!isCreating && (
- Drag and drop to reorder the chapters
+ Drag and drop to reorder the chapters
)}
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
new file mode 100644
index 0000000..882767b
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -0,0 +1,19 @@
+'use client'
+
+import {Chapter} from "@prisma/client";
+
+interface ChapterListFrom{
+items: Chapter[];
+onReorder: (updateData: { id:string;position:number }[]) => void;
+onEdit: (id:string) => void;
+}
+export default function ChapterList () {
+ return (
+
+ ChapterList
+
+
+ );
+};
+
+
From 8b991bd929769cb933ba04253439cb5fb82bd3cf Mon Sep 17 00:00:00 2001
From: YNTY <144984605+yntymakdev@users.noreply.github.com>
Date: Fri, 14 Feb 2025 16:42:19 +0600
Subject: [PATCH 317/706] Update README.md
---
README.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/README.md b/README.md
index aa2bc6b..92f4979 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,11 @@
This project is a functional platform focused on providing high-quality and free IT courses, as well as other educational content. It is part of the **Challenge 30github** initiative.
+
+
+
+
## Key Features:
- 📚 **Browse & Filter Courses**
- 💳 **Purchase Courses with Stripe**
From 2695706a82b9a125ce5d36c8ac8a9262f7b95b52 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:19:26 +0600
Subject: [PATCH 318/706] customize chapterlist page
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 882767b..3438001 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -7,7 +7,7 @@ items: Chapter[];
onReorder: (updateData: { id:string;position:number }[]) => void;
onEdit: (id:string) => void;
}
-export default function ChapterList () {
+export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom) {
return (
ChapterList
From 3c0b144e526e5dcd9ab7b61bb529900373946579 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:24:19 +0600
Subject: [PATCH 319/706] customize chapterlist page
---
package-lock.json | 92 +++++++++++++++++++
package.json | 1 +
.../[courseId]/components/ChapterList.tsx | 2 +
3 files changed, 95 insertions(+)
diff --git a/package-lock.json b/package-lock.json
index 00f9db1..b681328 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,6 +9,7 @@
"version": "0.1.0",
"dependencies": {
"@clerk/nextjs": "^6.11.0",
+ "@hello-pangea/dnd": "^18.0.1",
"@hookform/resolvers": "^3.10.0",
"@prisma/client": "^6.3.1",
"@radix-ui/react-dialog": "^1.1.6",
@@ -55,6 +56,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/@babel/runtime": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz",
+ "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==",
+ "license": "MIT",
+ "dependencies": {
+ "regenerator-runtime": "^0.14.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
"node_modules/@clerk/backend": {
"version": "1.23.11",
"resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-1.23.11.tgz",
@@ -240,6 +253,23 @@
"integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==",
"license": "MIT"
},
+ "node_modules/@hello-pangea/dnd": {
+ "version": "18.0.1",
+ "resolved": "https://registry.npmjs.org/@hello-pangea/dnd/-/dnd-18.0.1.tgz",
+ "integrity": "sha512-xojVWG8s/TGrKT1fC8K2tIWeejJYTAeJuj36zM//yEm/ZrnZUSFGS15BpO+jGZT1ybWvyXmeDJwPYb4dhWlbZQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@babel/runtime": "^7.26.7",
+ "css-box-model": "^1.2.1",
+ "raf-schd": "^4.0.3",
+ "react-redux": "^9.2.0",
+ "redux": "^5.0.1"
+ },
+ "peerDependencies": {
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
+ }
+ },
"node_modules/@hookform/resolvers": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.10.0.tgz",
@@ -1757,6 +1787,12 @@
"@types/react": "^19.0.0"
}
},
+ "node_modules/@types/use-sync-external-store": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz",
+ "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==",
+ "license": "MIT"
+ },
"node_modules/@uploadthing/mime-types": {
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@uploadthing/mime-types/-/mime-types-0.3.4.tgz",
@@ -2132,6 +2168,15 @@
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
"license": "MIT"
},
+ "node_modules/css-box-model": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz",
+ "integrity": "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==",
+ "license": "MIT",
+ "dependencies": {
+ "tiny-invariant": "^1.0.6"
+ }
+ },
"node_modules/cssesc": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
@@ -3180,6 +3225,12 @@
],
"license": "MIT"
},
+ "node_modules/raf-schd": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz",
+ "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==",
+ "license": "MIT"
+ },
"node_modules/react": {
"version": "19.0.0",
"resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz",
@@ -3269,6 +3320,29 @@
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
"license": "MIT"
},
+ "node_modules/react-redux": {
+ "version": "9.2.0",
+ "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz",
+ "integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/use-sync-external-store": "^0.0.6",
+ "use-sync-external-store": "^1.4.0"
+ },
+ "peerDependencies": {
+ "@types/react": "^18.2.25 || ^19",
+ "react": "^18.0 || ^19",
+ "redux": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "redux": {
+ "optional": true
+ }
+ }
+ },
"node_modules/react-remove-scroll": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz",
@@ -3359,6 +3433,18 @@
"node": ">=8.10.0"
}
},
+ "node_modules/redux": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
+ "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
+ "license": "MIT"
+ },
+ "node_modules/regenerator-runtime": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
+ "license": "MIT"
+ },
"node_modules/resolve": {
"version": "1.22.10",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
@@ -3816,6 +3902,12 @@
"node": ">=0.8"
}
},
+ "node_modules/tiny-invariant": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
+ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==",
+ "license": "MIT"
+ },
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
diff --git a/package.json b/package.json
index ea635ce..cd064dd 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
},
"dependencies": {
"@clerk/nextjs": "^6.11.0",
+ "@hello-pangea/dnd": "^18.0.1",
"@hookform/resolvers": "^3.10.0",
"@prisma/client": "^6.3.1",
"@radix-ui/react-dialog": "^1.1.6",
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 3438001..68f78b4 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -8,6 +8,8 @@ onReorder: (updateData: { id:string;position:number }[]) => void;
onEdit: (id:string) => void;
}
export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom) {
+ const
+
return (
ChapterList
From f33fc15aeb5f3b43c7970aca7a32c8a6595779f4 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:25:15 +0600
Subject: [PATCH 320/706] customize chapterlist page
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 68f78b4..53d10d1 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -1,6 +1,7 @@
'use client'
import {Chapter} from "@prisma/client";
+import {useState} from "react";
interface ChapterListFrom{
items: Chapter[];
@@ -8,7 +9,8 @@ onReorder: (updateData: { id:string;position:number }[]) => void;
onEdit: (id:string) => void;
}
export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom) {
- const
+ const [isMounted, setIsMounted] = useState(false);
+ const [chapters,setChapters] = useState(items);
return (
From 3d7abac02556fb3f0dfc4dedf704f26ee1216c5a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:26:32 +0600
Subject: [PATCH 321/706] customize chapterlist page
---
.../courses/[courseId]/components/ChapterList.tsx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 53d10d1..6cabc3c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -1,7 +1,7 @@
'use client'
import {Chapter} from "@prisma/client";
-import {useState} from "react";
+import {useEffect, useState} from "react";
interface ChapterListFrom{
items: Chapter[];
@@ -11,7 +11,14 @@ onEdit: (id:string) => void;
export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom) {
const [isMounted, setIsMounted] = useState(false);
const [chapters,setChapters] = useState(items);
+ useEffect(() => {
+ setIsMounted(true);
+ }, []);
+
+ if(!isMounted){
+ return null
+ }
return (
ChapterList
From ab904765b4779b9938009aa8431529728e23a6a2 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:27:14 +0600
Subject: [PATCH 322/706] customize chapterlist page
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 6cabc3c..a7cac44 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -14,6 +14,10 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
useEffect(() => {
setIsMounted(true);
}, []);
+ useEffect(() => {
+ setChapters(items);
+ }, []);
+
if(!isMounted){
From 0b9e75bde92ae19b15e1dd7cefe8ec28c28717c3 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:29:38 +0600
Subject: [PATCH 323/706] customize chapterlist page
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index a7cac44..ea48bb1 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -2,6 +2,7 @@
import {Chapter} from "@prisma/client";
import {useEffect, useState} from "react";
+import {Droppable} from "@hello-pangea/dnd";
interface ChapterListFrom{
items: Chapter[];
@@ -16,7 +17,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
}, []);
useEffect(() => {
setChapters(items);
- }, []);
+ }, [items]);
@@ -25,6 +26,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
}
return (
+
From 175965c9d478e6d1fa0324ec03c4fe261803aba7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:30:44 +0600
Subject: [PATCH 324/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index ea48bb1..998a9cb 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -26,7 +26,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
}
return (
-
ChapterList
From 13330b2c8fb012598a5f7415828e240ffc7009b1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:31:50 +0600
Subject: [PATCH 325/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 998a9cb..a975b5d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -27,6 +27,12 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
return (
+
+ {(provided) => (
+
+ )}
+
+
ChapterList
From 40c04edf65d8b40f4481795d126e161e479041f2 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:34:02 +0600
Subject: [PATCH 326/706] customize chapterlist drap and drop
---
.../courses/[courseId]/components/ChapterList.tsx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index a975b5d..e90c4e4 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -2,7 +2,7 @@
import {Chapter} from "@prisma/client";
import {useEffect, useState} from "react";
-import {Droppable} from "@hello-pangea/dnd";
+import {DragDropContext, Droppable} from "@hello-pangea/dnd";
interface ChapterListFrom{
items: Chapter[];
@@ -26,10 +26,15 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
}
return (
-
+
{}}/>
{(provided) => (
-
+
+ {chapters.map((chapter,index) => (
+
+ ))}
+
)}
From cc668b21337def8c82bd1c023ae9c6f4dbd6b17c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:35:51 +0600
Subject: [PATCH 327/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index e90c4e4..e684afd 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -2,7 +2,7 @@
import {Chapter} from "@prisma/client";
import {useEffect, useState} from "react";
-import {DragDropContext, Droppable} from "@hello-pangea/dnd";
+import {DragDropContext, Draggable, Droppable} from "@hello-pangea/dnd";
interface ChapterListFrom{
items: Chapter[];
@@ -32,7 +32,9 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapters.map((chapter,index) => (
+ draggableId={chapter.id}
+ index={index}
+ />
))}
)}
From 45555065335a779092ff3334239953f1296118f5 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:38:58 +0600
Subject: [PATCH 328/706] customize chapterlist drap and drop
---
.../courses/[courseId]/components/ChapterList.tsx | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index e684afd..fb03705 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -3,6 +3,7 @@
import {Chapter} from "@prisma/client";
import {useEffect, useState} from "react";
import {DragDropContext, Draggable, Droppable} from "@hello-pangea/dnd";
+import {cn} from "@/lib/utils";
interface ChapterListFrom{
items: Chapter[];
@@ -34,7 +35,17 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
+ >
+ {(provided) => (
+
+
+ )}
+
+
+
))}
)}
From 11568fece5bc525b7ef863149a190c45d7f0e414 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:40:09 +0600
Subject: [PATCH 329/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index fb03705..6a53cb7 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -38,9 +38,11 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
{(provided) => (
+ )}
+ ref={provided.innerRef}
+ {...provided.draggableProps}>
)}
From b43398837715a4427fc356310d4f29cad32bac49 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Fri, 14 Feb 2025 23:41:20 +0600
Subject: [PATCH 330/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 6a53cb7..38c39b2 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -42,7 +42,10 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
chapter.isPublished && 'bg-sky-100 border-sky-200 text-sky-700'
)}
ref={provided.innerRef}
- {...provided.draggableProps}>
+ {...provided.draggableProps}>
+
+
+
)}
From edfea5166a79dabf7cfe01dc6dc7590c5903d807 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:21:20 +0600
Subject: [PATCH 331/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 38c39b2..18d5050 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -43,7 +43,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
ref={provided.innerRef}
{...provided.draggableProps}>
-
+
From 72983ada48f08b4c90554f8db70cccb8e4431b45 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:21:30 +0600
Subject: [PATCH 332/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 18d5050..261d6d5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -43,7 +43,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
ref={provided.innerRef}
{...provided.draggableProps}>
-
+
From c69dc4e072554064c55b51225e32c023f357d4d7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:21:37 +0600
Subject: [PATCH 333/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 261d6d5..761ba9f 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -43,7 +43,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
ref={provided.innerRef}
{...provided.draggableProps}>
-
+
From 2491813e555a032ed1a691b1ff3dfc1e21e98126 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:21:44 +0600
Subject: [PATCH 334/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 761ba9f..aa2de21 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -43,7 +43,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
ref={provided.innerRef}
{...provided.draggableProps}>
-
+
From 7d00142c943477ca4234251e4508843574be42eb Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:21:52 +0600
Subject: [PATCH 335/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index aa2de21..814b71e 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -43,7 +43,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
ref={provided.innerRef}
{...provided.draggableProps}>
-
+
From 073d53941597d76f474bea73e5f0e1b6c4b6b0e5 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:22:05 +0600
Subject: [PATCH 336/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 814b71e..bb8c2e2 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -43,7 +43,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
ref={provided.innerRef}
{...provided.draggableProps}>
-
+
From 5b28f0ac7900ee00b2bfb0505c67189389a6f06a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:22:19 +0600
Subject: [PATCH 337/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index bb8c2e2..8ee70c6 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -43,7 +43,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
ref={provided.innerRef}
{...provided.draggableProps}>
-
+
From e0ae5145b87384148ba2be40c647b6f3babb676d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:22:40 +0600
Subject: [PATCH 338/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 8ee70c6..2a373cf 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -43,7 +43,9 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
ref={provided.innerRef}
{...provided.draggableProps}>
-
+
From 62014ae44caf66022abc0545f30c9cc3a4a783c5 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:22:45 +0600
Subject: [PATCH 339/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 2a373cf..9aabedf 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From 8ae723183395f5fd1d194e3ae191c791e1764f29 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:22:51 +0600
Subject: [PATCH 340/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 9aabedf..ba70367 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From 0a6041a16235d22aa1b6d76d6e981ab94509e678 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:22:56 +0600
Subject: [PATCH 341/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index ba70367..4a0b529 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From cc0c5215614f8095d6a5b6e27506e3eb62ed032f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:23:10 +0600
Subject: [PATCH 342/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 4a0b529..b6f38f7 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From 391cce201247c715df96bfdf401ca72b7a4b63ce Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:23:16 +0600
Subject: [PATCH 343/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index b6f38f7..54f861d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From 43ee2c1aa4e6f169bc7dd0de406a94d35ff5c8d8 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:23:28 +0600
Subject: [PATCH 344/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 54f861d..6135a0e 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From 0786d7df608fa61a263fd0c650b1dff65a67e54d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:23:33 +0600
Subject: [PATCH 345/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 6135a0e..d525e75 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From 2c0c3b6b650d6e10078ed9a8a6725ea9c95e7e96 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:23:38 +0600
Subject: [PATCH 346/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index d525e75..7fc0486 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From f103cb7db421cef41c09218769e432e95fd5280a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:23:42 +0600
Subject: [PATCH 347/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 7fc0486..4e17c84 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -44,7 +44,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
ref={provided.innerRef}
{...provided.draggableProps}>
From a18530522ca5f1dcb3bb2c8af08fb10d04dbdeaf Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:24:02 +0600
Subject: [PATCH 348/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 4e17c84..b82162f 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -45,7 +45,10 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{...provided.draggableProps}>
+ )}
+
+ {}
+ >
From 0a46032e939127c8204cc672778c808175d5a46c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:24:13 +0600
Subject: [PATCH 349/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index b82162f..2e9485d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -47,7 +47,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
chapter.isPublished &&'border-r-sky-200 hover:bg-sky-200'
)}
- {}
+ {...}
>
From 6358de5537a0cb2fb06449f227d9ddf2a9ee58c1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:24:22 +0600
Subject: [PATCH 350/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 2e9485d..282bd4b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -47,7 +47,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
chapter.isPublished &&'border-r-sky-200 hover:bg-sky-200'
)}
- {...}
+ {...provi}
>
From 0a9b53c2f2c2937bc3503c3d77871ee9b9e1a150 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:24:27 +0600
Subject: [PATCH 351/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 282bd4b..baed1b1 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -47,7 +47,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
chapter.isPublished &&'border-r-sky-200 hover:bg-sky-200'
)}
- {...provi}
+ {...provided}
>
From bc60cefacaa3c5b8bd5782c4b3b7c72e635bdb2b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:24:34 +0600
Subject: [PATCH 352/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index baed1b1..fcb514d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -47,7 +47,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
chapter.isPublished &&'border-r-sky-200 hover:bg-sky-200'
)}
- {...provided}
+ {...provided.drag}
>
From b7bec708004c1670e6e5199afb57c8b035b293ea Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:24:46 +0600
Subject: [PATCH 353/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index fcb514d..e30c70f 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -47,7 +47,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
chapter.isPublished &&'border-r-sky-200 hover:bg-sky-200'
)}
- {...provided.drag}
+ {...provided.dragHan}
>
From ec65e92eb362964f8524bdaeb8a1926168af556f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:25:40 +0600
Subject: [PATCH 354/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index e30c70f..c814780 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -47,7 +47,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
chapter.isPublished &&'border-r-sky-200 hover:bg-sky-200'
)}
- {...provided.dragHan}
+ {...provided.dragHandl}
>
From 0686d142bdd6c149541ecf414899ddf9897e5564 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:25:49 +0600
Subject: [PATCH 355/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index c814780..c64d2a8 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -47,7 +47,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
chapter.isPublished &&'border-r-sky-200 hover:bg-sky-200'
)}
- {...provided.dragHandl}
+ {...provided.dragHandleProps}
>
From f6e0a27b27dfa45fc71eeb9da300f5889a380af0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:07 +0600
Subject: [PATCH 356/706] fast customize
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index c64d2a8..45ffd35 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -48,7 +48,10 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
{...provided.dragHandleProps}
- >
+
+ >
From d3a213c464f31cda1c07dcc63bc251ce424628a1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:12 +0600
Subject: [PATCH 357/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 45ffd35..4d74514 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -49,7 +49,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{...provided.dragHandleProps}
- >
From 7ce182dcef0e50840b48e2f4bbe0ae1bfe6d0848 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:19 +0600
Subject: [PATCH 358/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 4d74514..75231ab 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -4,6 +4,7 @@ import {Chapter} from "@prisma/client";
import {useEffect, useState} from "react";
import {DragDropContext, Draggable, Droppable} from "@hello-pangea/dnd";
import {cn} from "@/lib/utils";
+import {Grid} from "lucide-react";
interface ChapterListFrom{
items: Chapter[];
@@ -49,7 +50,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{...provided.dragHandleProps}
- >
From 3c00c5e9e0fa9f86e21c4f7c8dc676cacc3b32a4 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:28 +0600
Subject: [PATCH 359/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 75231ab..b4ed869 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -50,7 +50,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{...provided.dragHandleProps}
- >
+ >
From 5ff5a58ba37b01ea89c335f0966356c8f488f1c3 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:34 +0600
Subject: [PATCH 360/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index b4ed869..a69aedc 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -50,7 +50,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{...provided.dragHandleProps}
- >
+ >
From 55d61b35105a0c4c91132c69beee023cedb72c09 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:39 +0600
Subject: [PATCH 361/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index a69aedc..bbce1d9 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -50,7 +50,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{...provided.dragHandleProps}
- >
+ >
From 39abc29fda60b32b7084c515ced280d621e51379 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:46 +0600
Subject: [PATCH 362/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index bbce1d9..ebf91e3 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -51,8 +51,8 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{...provided.dragHandleProps}
>
-
+ {}
From 1da4d96472f5ac359d692d767e93c54079541d0f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:51 +0600
Subject: [PATCH 363/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index ebf91e3..3f8d2e8 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
- {}
+ {chap}
From a2e308336592cf30f45dbc80e4308aba224a95fe Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:26:57 +0600
Subject: [PATCH 364/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 3f8d2e8..b0fc58e 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
- {chap}
+ {chapter.ti}
From 5f701b1826ee4b898120fdd037b82b8d341eff3c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:27:02 +0600
Subject: [PATCH 365/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index b0fc58e..e665393 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
- {chapter.ti}
+ {chapter.title}
From f96e6daf7ca7b867e0ae129ba16a3c5623de1810 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:27:13 +0600
Subject: [PATCH 366/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index e665393..240f801 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,6 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
+ div
{chapter.title}
From 4d4befe957334988abf57279e4cce57d0f4e93d9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:27:20 +0600
Subject: [PATCH 367/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 240f801..991ce8f 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
- div
+
{chapter.title}
From dc636c9e80b2b3541af4413db60ceb9248a79f98 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:27:27 +0600
Subject: [PATCH 368/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 991ce8f..bdf4fff 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
-
+
{chapter.title}
From f2de35cbac861d2bc8a0115b296fdf2f164e6add Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:27:44 +0600
Subject: [PATCH 369/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index bdf4fff..37aab76 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
-
+
{chapter.title}
From ec6813adcbaea18340c08b2e941305b25ba49e16 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:27:49 +0600
Subject: [PATCH 370/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 37aab76..7b4afa5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
-
+
{chapter.title}
From db06903b4fbf5a1dfca089d38678c0a853649ca9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:27:53 +0600
Subject: [PATCH 371/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 7b4afa5..1018d80 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
-
+
{chapter.title}
From 1c0732ecbcbac865bd892101731c43f65604ce87 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sat, 15 Feb 2025 20:27:58 +0600
Subject: [PATCH 372/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 1018d80..8b14ee5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,7 +52,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
-
+
{chapter.title}
From 1388e300e9482eeff8d27752d8a6209997c15d52 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:40:35 +0600
Subject: [PATCH 373/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 8b14ee5..eadfec4 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -52,8 +52,8 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
-
{chapter.title}
+
From 9e639304cf3abeda1e36821d801c83ddb0513117 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:40:42 +0600
Subject: [PATCH 374/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index eadfec4..73d2bd3 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -53,7 +53,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
{chapter.title}
-
+
From 2593325bdac62bcbf5bd7c84e0c7b0d7ecab8321 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:40:56 +0600
Subject: [PATCH 375/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 73d2bd3..a573cca 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -53,7 +53,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
{chapter.title}
-
+
From a7e83b8ca1933dcc057d10537af569b3d6e4c30e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:41:02 +0600
Subject: [PATCH 376/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index a573cca..6eb4f69 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -53,7 +53,9 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
>
{chapter.title}
-
+
+ {}
+
From 8047a211f3b5f5e7c38c29d5b2cff9ffd5f47b3a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:41:14 +0600
Subject: [PATCH 377/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 6eb4f69..3ad1234 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -54,7 +54,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.title}
- {}
+ {chapter}
From 16f0cd07933398a762a96a44b69bd9d69136de97 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:41:20 +0600
Subject: [PATCH 378/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 3ad1234..91c1921 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -54,7 +54,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.title}
- {chapter}
+ {chapter.is}
From 20da0ac48d00b6fcd7918f095ba6b47535864175 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:41:27 +0600
Subject: [PATCH 379/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 91c1921..83bca46 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -54,7 +54,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.title}
- {chapter.is}
+ {chapter.isFree}
From c0e33c266a4a58cfe1273c35ad0bbc246f21a09b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:41:35 +0600
Subject: [PATCH 380/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 83bca46..4bad13c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -54,7 +54,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.title}
- {chapter.isFree}
+ {chapter.isFree &&}
From 2db21a9ad9204951c6a6833494b8c4a4cf0a1400 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:41:39 +0600
Subject: [PATCH 381/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 4bad13c..74a4c53 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -54,7 +54,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.title}
- {chapter.isFree &&}
+ {chapter.isFree &&()}
From de187f2b7897d2db66b424a0feab7a33f372ee5f Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:41:46 +0600
Subject: [PATCH 382/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 74a4c53..301f72b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -54,7 +54,9 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.title}
- {chapter.isFree &&()}
+ {chapter.isFree &&(
+
From 03903dcdfee9727f31355e94ce113c71b1be868d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:41:53 +0600
Subject: [PATCH 383/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 301f72b..6aaeb25 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -55,7 +55,9 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.title}
{chapter.isFree &&(
-
+
+
)}
From 7e91bd3a826ea19805548ba1608eccd59673efa0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:42:12 +0600
Subject: [PATCH 384/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 6aaeb25..6b0ccbc 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -56,7 +56,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.isFree &&(
-
+Free
)}
From e5c77ecef1a62856f26046679b5888f0ed52f39a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:42:23 +0600
Subject: [PATCH 385/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 6b0ccbc..ba266f5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,6 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
+ <
From 1efb60ee8d419479720825860cda2dfa440ece00 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:42:32 +0600
Subject: [PATCH 386/706] now it will so fast
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index ba266f5..8886bf0 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
- <
+
From c2c3b6c69468cc011bd92acfcce237e3e53e4250 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:42:37 +0600
Subject: [PATCH 387/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 8886bf0..934f746 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
From 4b8060a4239a1868edb83263a38b7109d016ba9b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:42:43 +0600
Subject: [PATCH 388/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 934f746..1b8b371 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
From 4d7422017dec3265c13b2c6aabd57537fdca207c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:42:48 +0600
Subject: [PATCH 389/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 1b8b371..490fc4c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
From 8cb7a38b7f2a233e309140f04288214e67730c72 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:42:56 +0600
Subject: [PATCH 390/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 490fc4c..7740f3f 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
From c10253e49dda803f63d2c54a993b3de9eaef20e7 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:43:02 +0600
Subject: [PATCH 391/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 7740f3f..c0e3f9c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
+
From 8037bea9bc32edccf5b7182e313e2bd610f45a51 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:43:08 +0600
Subject: [PATCH 392/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index c0e3f9c..3ac9432 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
+
From 41fe1507b669477ee621bdd335d8f6e1cc794361 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:43:15 +0600
Subject: [PATCH 393/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 3ac9432..69e8df8 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
+
From aa1a381773f8903d08bb193d72af7998efcffe8e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:43:25 +0600
Subject: [PATCH 394/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 69e8df8..83c124e 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
+
From bd4c54db5f09a0a74c2824c9c6cbf9572f6958e9 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:43:30 +0600
Subject: [PATCH 395/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 83c124e..d815e73 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
+
From b45cfa5d7af0fb0e18ac52d0c011553596e79c2b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:43:36 +0600
Subject: [PATCH 396/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index d815e73..2f390a3 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -59,7 +59,9 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
Free
)}
-
+
From 0a680168589031715da47f7e1919e7f1fbf5a237 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:43:46 +0600
Subject: [PATCH 397/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 2f390a3..541cf9e 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -60,7 +60,7 @@ Free
)}
From 1c559f31ae24710edc43f7c053fff8125c3134b5 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:44:31 +0600
Subject: [PATCH 398/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 541cf9e..bdea10a 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -60,7 +60,7 @@ Free
)}
From 4e1d94a2fbcd9b39136c8c022c07abee60cd73da Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:44:39 +0600
Subject: [PATCH 399/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index bdea10a..6b14e53 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -60,7 +60,7 @@ Free
)}
From bd70e9c07b900f15eabaf162f3eb825ad1481134 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:44:44 +0600
Subject: [PATCH 400/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 6b14e53..81cf644 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -60,7 +60,7 @@ Free
)}
From 4cdd81b399b3d653084f0772d1bedbabb4b8b9c4 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:44:52 +0600
Subject: [PATCH 401/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 81cf644..98a2b00 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -60,7 +60,7 @@ Free
)}
From 93439c94b3168e3f06df171b73b87778d5675b48 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:44:57 +0600
Subject: [PATCH 402/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 98a2b00..6dc9efb 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -60,7 +60,7 @@ Free
)}
From d2abd06478f55c36d467bbd121f72f8c576af362 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:03 +0600
Subject: [PATCH 403/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 6dc9efb..065ac86 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -60,7 +60,8 @@ Free
)}
From 0dc00f431bcaa5112df99c092c64a415f504539e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:08 +0600
Subject: [PATCH 404/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 065ac86..a92efa5 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 61cffffc17719860eaed9b606886ab451b44f4eb Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:14 +0600
Subject: [PATCH 405/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index a92efa5..36e459c 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 84dd4a7cb0851f4b01fc8647ac8235ab8df52ade Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:19 +0600
Subject: [PATCH 406/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 36e459c..9cb9c32 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 548cfec5d78bec26acc026251e3924315b7e85bf Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:24 +0600
Subject: [PATCH 407/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 9cb9c32..34d24ff 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From b8898aa7ed056877d999d015eaf9dd15d300ab46 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:30 +0600
Subject: [PATCH 408/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 34d24ff..8a086ff 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From e4600cb44ca8a9df85d9314056034a4afab0bd99 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:34 +0600
Subject: [PATCH 409/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 8a086ff..8ebf1c6 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 67f18a279a7b7550aa7fcd41fee422ca7d190985 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:38 +0600
Subject: [PATCH 410/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 8ebf1c6..56f6570 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 5e56a2a96c60910154c7513f117ba56a30c02e1d Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:44 +0600
Subject: [PATCH 411/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 56f6570..86851c6 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From ef308003d1dfec3e7538dc05c332b39695dd5b9e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:48 +0600
Subject: [PATCH 412/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 86851c6..09f1eac 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 59f90670a23dbd96ef509e5c39b6e9ab1d3ff666 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:53 +0600
Subject: [PATCH 413/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 09f1eac..76c9d98 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 47cd57f25c6aeefcaa0189e0fa5cd5990c02baff Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:45:57 +0600
Subject: [PATCH 414/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 76c9d98..fa99512 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 4254f8d02d46ef4bab87a57984d5361e37d6cc75 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:46:02 +0600
Subject: [PATCH 415/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index fa99512..8a7479f 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From ea2a7fb15765be72c0bb56299364b6dcc5815c9b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:46:06 +0600
Subject: [PATCH 416/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 8a7479f..9f4dfce 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 927c8138aef866c18a83f96e77154535d53cb237 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:46:10 +0600
Subject: [PATCH 417/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 9f4dfce..60e3e4e 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 454101b38ac97d8c16fe90ef6a27aae75919e6bb Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:48:38 +0600
Subject: [PATCH 418/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 60e3e4e..07d20ba 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From bb9ed9d890d05d9206ea9e166defc9c9f3297d6a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:48:44 +0600
Subject: [PATCH 419/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 07d20ba..bdc19dc 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -61,7 +61,7 @@ Free
)}
From 3d7093f4eab88c8ff17b918ad2c65afa07bb5587 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:49:01 +0600
Subject: [PATCH 420/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index bdc19dc..cc964e3 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -63,6 +63,7 @@ Free
'bg-slate-500',
chapter.isPublished?"Published":"Draft"
)}>
+
From 8e5a9746a22a60b935bce232640909c70bc35412 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:50:36 +0600
Subject: [PATCH 421/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index cc964e3..f3369bd 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -63,7 +63,7 @@ Free
'bg-slate-500',
chapter.isPublished?"Published":"Draft"
)}>
-
From 7e5d7889d33ba8f58bc0e837092fcb9ffc67a32b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Sun, 16 Feb 2025 22:50:51 +0600
Subject: [PATCH 422/706] customize chapterlist drap and drop
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index f3369bd..a2b11c1 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -63,7 +63,7 @@ Free
'bg-slate-500',
chapter.isPublished?"Published":"Draft"
)}>
-
+
From 0fab24545ae83cea761c5c083b0f03bcaa2de2b1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:05:47 +0600
Subject: [PATCH 423/706] now i am working hard
---
.../courses/[courseId]/components/ChapterList.tsx | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index a2b11c1..0bad278 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -4,7 +4,8 @@ import {Chapter} from "@prisma/client";
import {useEffect, useState} from "react";
import {DragDropContext, Draggable, Droppable} from "@hello-pangea/dnd";
import {cn} from "@/lib/utils";
-import {Grid} from "lucide-react";
+import {Grid, Pencil} from "lucide-react";
+import {Badge} from "@/components/ui/badge";
interface ChapterListFrom{
items: Chapter[];
@@ -56,21 +57,17 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
{chapter.isFree &&(
-Free
+ Free
)}
-
+ onEdit(chapter.id)} className='w-4 h-4 cursor-pointer hover:opacity-75 transition'/>
-
-
)}
-
-
))}
From 0b1a5e42d5bdc2c778fb5d4e6035fc06d0a8d896 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:10:13 +0600
Subject: [PATCH 424/706] fixing some bug
---
.../courses/[courseId]/components/ChapterList.tsx | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 0bad278..d72be58 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -28,8 +28,7 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
return null
}
return (
-
-
{}}/>
+ {}}>
{(provided) => (
@@ -70,14 +69,12 @@ export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom)
)}
))}
+ {provided.placeholder}
)}
-
- ChapterList
-
-
- );
+
+);
};
From 0bac82cd8d5f2c69efd61995fccc73710656be68 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:25:04 +0600
Subject: [PATCH 425/706] fixing bug
---
.../[courseId]/components/ChapterForm.tsx | 4 +-
.../[courseId]/components/ChapterList.tsx | 130 +++++++++---------
2 files changed, 68 insertions(+), 66 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 42ef557..c2d7bbc 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -83,7 +83,9 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
{!isCreating && (
{!initialData.chapters.length ? 'No chapters' : ''}
- {}} onReorder={} items={initialData.chapters || []} />
+ {}}
+ onReorder={() => {}}
+ items={initialData.chapters || []} />
)}
{!isCreating && (
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index d72be58..bca5a9d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -1,80 +1,80 @@
-'use client'
+'use client';
-import {Chapter} from "@prisma/client";
-import {useEffect, useState} from "react";
-import {DragDropContext, Draggable, Droppable} from "@hello-pangea/dnd";
-import {cn} from "@/lib/utils";
-import {Grid, Pencil} from "lucide-react";
-import {Badge} from "@/components/ui/badge";
+import { Chapter } from "@prisma/client";
+import { useEffect, useState } from "react";
+import { DragDropContext, Draggable, Droppable } from "@hello-pangea/dnd";
+import { cn } from "@/lib/utils";
+import { Grid, Pencil } from "lucide-react";
+import { Badge } from "@/components/ui/badge";
-interface ChapterListFrom{
-items: Chapter[];
-onReorder: (updateData: { id:string;position:number }[]) => void;
-onEdit: (id:string) => void;
+interface ChapterListFrom {
+ items: Chapter[];
+ onReorder: (updateData: { id: string; position: number }[]) => void;
+ onEdit: (id: string) => void;
}
-export default function ChapterList ({items,onReorder,onEdit}:ChapterListFrom) {
+
+export default function ChapterList({ items, onReorder, onEdit }: ChapterListFrom) {
const [isMounted, setIsMounted] = useState(false);
- const [chapters,setChapters] = useState(items);
+ const [chapters, setChapters] = useState(items);
+
useEffect(() => {
setIsMounted(true);
}, []);
+
useEffect(() => {
setChapters(items);
}, [items]);
-
-
- if(!isMounted){
- return null
+ if (!isMounted) {
+ return null;
}
- return (
- {}}>
-
- {(provided) => (
-
- {chapters.map((chapter,index) => (
-
- {(provided) => (
-
-
{}}>
+
+ {(provided) => (
+
+ {chapters.map((chapter, index) => (
+
+ {(provided) => (
+
+
-
- {chapter.title}
-
- {chapter.isFree &&(
-
- Free
-
- )}
-
-
onEdit(chapter.id)} className='w-4 h-4 cursor-pointer hover:opacity-75 transition'/>
+ >
+
+
+ {chapter.title}
+
+ {chapter.isFree && (
Free )}
+
+ {chapter.isPublished ? "Published" : "Draft"}
+
+
onEdit(chapter.id)}
+ className="w-4 h-4 cursor-pointer hover:opacity-75 transition"
+ />
+
-
- )}
-
- ))}
- {provided.placeholder}
-
- )}
-
-
-);
-};
-
-
+ )}
+
+ ))}
+ {provided.placeholder}
+
+ )}
+
+
+ );
+}
From e8e2f15325e2ac6fdee6a79e0ee82b9da5c45fc0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:28:37 +0600
Subject: [PATCH 426/706] adding feature DragEnd for dragdrop
---
.../courses/[courseId]/components/ChapterList.tsx | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index bca5a9d..822f238 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -25,12 +25,23 @@ export default function ChapterList({ items, onReorder, onEdit }: ChapterListFro
setChapters(items);
}, [items]);
+
+ const DragEnd = (result:DropResult) => {
+ if(!result.destination) return;
+ const items = Array.from(chapters);
+ const [reorderedItem] = items.splice(result.source.index,1);
+ items.splice(result.destination.index,0.reorderedItem);
+ const startIndex = Math.
+
+
+ }
+
if (!isMounted) {
return null;
}
return (
- {}}>
+ {onDragEnd}}>
{(provided) => (
From de4c008a4bb5158ffa04a6e04020aa3f8c7457a5 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:34:24 +0600
Subject: [PATCH 427/706] added feature
---
.../courses/[courseId]/components/ChapterList.tsx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 822f238..24a4d66 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -31,9 +31,17 @@ export default function ChapterList({ items, onReorder, onEdit }: ChapterListFro
const items = Array.from(chapters);
const [reorderedItem] = items.splice(result.source.index,1);
items.splice(result.destination.index,0.reorderedItem);
- const startIndex = Math.
+ const startIndex = Math.min(result.destination.index,result.source.index);
+ const endIndex = Math.max(result.destination.index,result.source.index);
+const updatedChapters = items.slice(startIndex, endIndex + 1);
+setChapters(items)
+ const bulkUpdateDate = updatedChapters.map((chapter) => ({
+ id: chapter.id,
+ position: items.findIndex((item) => item.id === chapter.id),
+ }))
+ onReorder(bulkUpdateDate);
}
if (!isMounted) {
From 4e5014967df9054782caf602782cf1eb016a64b6 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:36:46 +0600
Subject: [PATCH 428/706] fixed onDrag end
---
.../teacher/courses/[courseId]/components/ChapterList.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index 24a4d66..e8840e4 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -2,7 +2,7 @@
import { Chapter } from "@prisma/client";
import { useEffect, useState } from "react";
-import { DragDropContext, Draggable, Droppable } from "@hello-pangea/dnd";
+import {DragDropContext, Draggable, Droppable, DropResult} from "@hello-pangea/dnd";
import { cn } from "@/lib/utils";
import { Grid, Pencil } from "lucide-react";
import { Badge } from "@/components/ui/badge";
@@ -26,11 +26,11 @@ export default function ChapterList({ items, onReorder, onEdit }: ChapterListFro
}, [items]);
- const DragEnd = (result:DropResult) => {
+ const onDragEnd = (result:DropResult) => {
if(!result.destination) return;
const items = Array.from(chapters);
const [reorderedItem] = items.splice(result.source.index,1);
- items.splice(result.destination.index,0.reorderedItem);
+ items.splice(result.destination.index,0,reorderedItem);
const startIndex = Math.min(result.destination.index,result.source.index);
const endIndex = Math.max(result.destination.index,result.source.index);
const updatedChapters = items.slice(startIndex, endIndex + 1);
From 10bb9565958a199288ec74abab38bc052bc8e759 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:42:57 +0600
Subject: [PATCH 429/706] wiriting onReorder feature on ChapterForm tsx
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 5 +++++
.../teacher/courses/[courseId]/components/ChapterList.tsx | 2 +-
.../courses/[courseId]/components/DescriptionForm.tsx | 3 +++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index c2d7bbc..bd34fac 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -50,7 +50,12 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
console.error("Ошибка при обновлении курса:", error);
}
};
+ const onReorder= async (updateData:{id:string;position:number}[]) => {
+ try {
+
+ }
+ }
return (
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
index e8840e4..bedf600 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList.tsx
@@ -49,7 +49,7 @@ setChapters(items)
}
return (
-
{onDragEnd}}>
+
{(provided) => (
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 6e50b5f..912070d 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
@@ -48,6 +48,9 @@ export const DescriptionForm = ({ initialData, courseId }: DescriptionFormProps)
}
};
+
+
+
return (
From d7621045ad09a70a1b1d099b2d57d1c6c5ecfab3 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:44:33 +0600
Subject: [PATCH 430/706] wiriting onReorder feature on ChapterForm tsx
---
.../courses/[courseId]/components/ChapterForm.tsx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index bd34fac..4e91582 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -52,7 +52,14 @@ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
};
const onReorder= async (updateData:{id:string;position:number}[]) => {
try {
-
+setIsupdating(true);
+await axios.put(`/api/courses/${courseId}/chapters/reorder`,{
+ list:updateData
+})
+ toast.success("Chapter reordered!");
+router.refresh();
+ }catch (error){
+ console.log(error)
}
}
From 7c6d572a7cd0caaea36ce3677de42beed8d05ef0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:48:48 +0600
Subject: [PATCH 431/706] creating route api for reorder on chapter
---
.../courses/[courseId]/components/ChapterForm.tsx | 2 +-
src/app/api/courses/[courseId]/chapters/reorder/route.ts | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
create mode 100644 src/app/api/courses/[courseId]/chapters/reorder/route.ts
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 4e91582..38bfc57 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -96,7 +96,7 @@ router.refresh();
{!initialData.chapters.length ? 'No chapters' : ''}
{}}
- onReorder={() => {}}
+ onReorder={onReorder}
items={initialData.chapters || []} />
)}
diff --git a/src/app/api/courses/[courseId]/chapters/reorder/route.ts b/src/app/api/courses/[courseId]/chapters/reorder/route.ts
new file mode 100644
index 0000000..29bf725
--- /dev/null
+++ b/src/app/api/courses/[courseId]/chapters/reorder/route.ts
@@ -0,0 +1,9 @@
+export async function PUT(
+ req: Request,{params}: {params: {courseId: string}}
+){
+ try {
+
+ }catch (error){
+ console.log(error)
+ }
+}
\ No newline at end of file
From 046a549c6452c4590712850d7f341a40a709c330 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:50:51 +0600
Subject: [PATCH 432/706] creating route api for reorder on chapter
---
src/app/api/courses/[courseId]/chapters/reorder/route.ts | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/app/api/courses/[courseId]/chapters/reorder/route.ts b/src/app/api/courses/[courseId]/chapters/reorder/route.ts
index 29bf725..ae0782f 100644
--- a/src/app/api/courses/[courseId]/chapters/reorder/route.ts
+++ b/src/app/api/courses/[courseId]/chapters/reorder/route.ts
@@ -1,9 +1,13 @@
+import {auth} from "@clerk/nextjs/server";
+import {NextResponse} from "next/server";
+
export async function PUT(
req: Request,{params}: {params: {courseId: string}}
){
try {
-
+const {userId} = await auth()
}catch (error){
- console.log(error)
+ console.log('[REORDER]', error);
+ return new NextResponse('Internal Server Error', {status: 500})
}
}
\ No newline at end of file
From 7e1bff12bda639840bdf6efea96efa5fee1e0f44 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:53:03 +0600
Subject: [PATCH 433/706] creating route api for reorder on chapter
---
.../api/courses/[courseId]/chapters/reorder/route.ts | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/app/api/courses/[courseId]/chapters/reorder/route.ts b/src/app/api/courses/[courseId]/chapters/reorder/route.ts
index ae0782f..2a00492 100644
--- a/src/app/api/courses/[courseId]/chapters/reorder/route.ts
+++ b/src/app/api/courses/[courseId]/chapters/reorder/route.ts
@@ -6,8 +6,16 @@ export async function PUT(
){
try {
const {userId} = await auth()
+
+ if(!userId){
+ return new NextResponse('Unauthorized', {status:401})
+ }
+ const {list }= await req.json()
+
}catch (error){
console.log('[REORDER]', error);
return new NextResponse('Internal Server Error', {status: 500})
}
-}
\ No newline at end of file
+}
+
+
From 8e491a67796da13e8855f772eb3213452a8749f1 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 15:56:41 +0600
Subject: [PATCH 434/706] creating route api for reorder on chapter
---
.../[courseId]/chapters/reorder/route.ts | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/app/api/courses/[courseId]/chapters/reorder/route.ts b/src/app/api/courses/[courseId]/chapters/reorder/route.ts
index 2a00492..29a2df9 100644
--- a/src/app/api/courses/[courseId]/chapters/reorder/route.ts
+++ b/src/app/api/courses/[courseId]/chapters/reorder/route.ts
@@ -1,5 +1,6 @@
import {auth} from "@clerk/nextjs/server";
import {NextResponse} from "next/server";
+import {db} from "@/lib/db";
export async function PUT(
req: Request,{params}: {params: {courseId: string}}
@@ -11,6 +12,27 @@ const {userId} = await auth()
return new NextResponse('Unauthorized', {status:401})
}
const {list }= await req.json()
+ const ownCourse = await db.course.findUnique({
+ where: {
+
+ id:params.courseId,
+ userId: userId
+ }
+ })
+ if(!ownCourse){
+ return new NextResponse('Unauthorized', {status:401})
+ }
+
+ for(let item of list){
+ await db.chapter.update({
+
+ where:{id: item.id},
+ data:{position: item.position}
+ })
+ }
+
+ return new NextResponse('Success ',{status: 200})
+
}catch (error){
console.log('[REORDER]', error);
From b570643950efc2441335e242f88595eb4f1a03de Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 20:42:18 +0600
Subject: [PATCH 435/706] customize chapter form (if rendering)
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 38bfc57..2befb65 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -65,6 +65,11 @@ router.refresh();
}
return (
+ {isUpdating && (
+
+
+
+ )}
Chapter Customize
From 93477e0472237c52c83b608d6b98b3ac23011560 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 20:43:30 +0600
Subject: [PATCH 436/706] customize chapter form (if rendering)
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 2befb65..d0e78cb 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -4,7 +4,7 @@ import * as z from "zod";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import axios from "axios";
-import { Pencil, PlusCircle } from "lucide-react";
+import {Loader2, Pencil, PlusCircle} from "lucide-react";
import { Button } from "@/components/ui/button";
import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form";
import toast from "react-hot-toast";
@@ -25,7 +25,7 @@ interface ChapterFormProps {
export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
const [isCreating, setIsCreating] = useState(false);
- const [Isupdating, setIsupdating] = useState(false);
+ const [isUpdating, setIsupdating] = useState(false);
const router = useRouter();
const form = useForm>({
@@ -67,7 +67,7 @@ router.refresh();
{isUpdating && (
-
+
)}
From 52caa6086d56034fd9cbad202243789611d9b99b Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 20:45:20 +0600
Subject: [PATCH 437/706] customize chapter form (if rendering)
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index d0e78cb..30af5df 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -66,8 +66,8 @@ router.refresh();
return (
{isUpdating && (
-
-
+
+
)}
From fb2963ca671029cfc2b7c9be56e714730be1c7db Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 20:46:47 +0600
Subject: [PATCH 438/706] customize chapter form (if rendering)
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 30af5df..732d160 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -59,7 +59,9 @@ await axios.put(`/api/courses/${courseId}/chapters/reorder`,{
toast.success("Chapter reordered!");
router.refresh();
}catch (error){
- console.log(error)
+ toast.error('Something went wrong!');
+ }finally {
+ setIsupdating(false);
}
}
From bee8c19733dc1246285d7b9ba11a9e9e5d1f209e Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 20:58:43 +0600
Subject: [PATCH 439/706] customize chapter form (if rendering)
---
.../[courseId]/components/ChapterForm.tsx | 216 +++++++++---------
1 file changed, 108 insertions(+), 108 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 732d160..eded9b7 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -1,117 +1,117 @@
-'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 {Loader2, Pencil, PlusCircle} from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form";
-import toast from "react-hot-toast";
-import { useRouter } from "next/navigation";
-import { cn } from "@/lib/utils";
-import { Chapter, Course } from "@prisma/client";
-import { Input } from "@/components/ui/input";
-import ChapterList from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList";
+ '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 {Loader2, Pencil, PlusCircle} from "lucide-react";
+ import { Button } from "@/components/ui/button";
+ import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/form";
+ import toast from "react-hot-toast";
+ import { useRouter } from "next/navigation";
+ import { cn } from "@/lib/utils";
+ import { Chapter, Course } from "@prisma/client";
+ import { Input } from "@/components/ui/input";
+ import ChapterList from "@/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterList";
-const formSchema = z.object({
- title: z.string().min(1),
-});
-
-interface ChapterFormProps {
- initialData: Course & { chapters: Chapter[] };
- courseId: string;
-}
-
-export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
- const [isCreating, setIsCreating] = useState(false);
- const [isUpdating, setIsupdating] = useState(false);
- const router = useRouter();
-
- const form = useForm>({
- resolver: zodResolver(formSchema),
- defaultValues: {
- title: ""
- },
+ const formSchema = z.object({
+ title: z.string().min(1),
});
- const { isSubmitting, isDirty } = form.formState;
- const toggleCreating = () => {
- setIsCreating((current) => !current);
+ interface ChapterFormProps {
+ initialData: Course & { chapters: Chapter[] };
+ courseId: string;
}
- const onSubmit = async (values: z.infer) => {
- try {
- await axios.post(`/api/courses/${courseId}/chapters`, values);
- toast.success("Chapter created!");
- toggleCreating();
- router.refresh();
- } catch (error) {
- console.error("Ошибка при обновлении курса:", error);
- }
- };
- const onReorder= async (updateData:{id:string;position:number}[]) => {
- try {
-setIsupdating(true);
-await axios.put(`/api/courses/${courseId}/chapters/reorder`,{
- list:updateData
-})
- toast.success("Chapter reordered!");
-router.refresh();
- }catch (error){
- toast.error('Something went wrong!');
- }finally {
- setIsupdating(false);
+ export const ChapterForm = ({ initialData, courseId }: ChapterFormProps) => {
+ const [isCreating, setIsCreating] = useState(false);
+ const [isUpdating, setIsupdating] = useState(false);
+ const router = useRouter();
+
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ title: ""
+ },
+ });
+
+ const { isSubmitting, isDirty } = form.formState;
+ const toggleCreating = () => {
+ setIsCreating((current) => !current);
}
- }
- return (
-
- {isUpdating && (
-
-
+ const onSubmit = async (values: z.infer
) => {
+ try {
+ await axios.post(`/api/courses/${courseId}/chapters`, values);
+ toast.success("Chapter created!");
+ toggleCreating();
+ router.refresh();
+ } catch (error) {
+ console.error("Ошибка при обновлении курса:", error);
+ }
+ };
+ const onReorder= async (updateData:{id:string;position:number}[]) => {
+ try {
+ setIsupdating(true);
+ await axios.put(`/api/courses/${courseId}/chapters/reorder`,{
+ list:updateData
+ })
+ toast.success("Chapter reordered!");
+ router.refresh();
+ }catch (error){
+ toast.error('Something went wrong!');
+ }finally {
+ setIsupdating(false);
+ }
+
+ }
+ return (
+
+ {isUpdating && (
+
+
+
+ )}
+
+ Chapter Customize
+
+ {isCreating ? <>Cancel> : <> Add a chapter>}
+
- )}
-
- Chapter Customize
-
- {isCreating ? <>Cancel> : <> Add a chapter>}
-
+ {isCreating && (
+
+
+ (
+
+
+
+
+
+
+ )}
+ />
+
+ Create
+
+
+
+ )}
+ {!isCreating && (
+
+ {!initialData.chapters.length ? 'No chapters' : ''}
+ {}}
+ onReorder={onReorder}
+ items={initialData.chapters || []} />
+
+ )}
+ {!isCreating && (
+
+ Drag and drop to reorder the chapters
+
+ )}
- {isCreating && (
-
-
- (
-
-
-
-
-
-
- )}
- />
-
- Create
-
-
-
- )}
- {!isCreating && (
-
- {!initialData.chapters.length ? 'No chapters' : ''}
- {}}
- onReorder={onReorder}
- items={initialData.chapters || []} />
-
- )}
- {!isCreating && (
-
- Drag and drop to reorder the chapters
-
- )}
-
- );
-};
+ );
+ };
From f9ef6213cd7131a277f6a38c077e0184ce7e75e0 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 21:01:17 +0600
Subject: [PATCH 440/706] customize chapter form (if rendering)
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index eded9b7..1422b8b 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -69,7 +69,7 @@
{isUpdating && (
-
+
)}
From efe60bf8668c7155773f07aa865d27cb75d7da05 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 21:14:12 +0600
Subject: [PATCH 441/706] now i am gonna start edit page on ChaperForm
---
.../teacher/courses/[courseId]/components/ChapterForm.tsx | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 1422b8b..734c266 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -65,6 +65,14 @@
}
}
+
+
+ const onEdit =(id: string) => {
+ router.push(`/teacher/courses/${courseId}/chapters/${id}`);
+
+
+ }
+
return (
{isUpdating && (
From 0ed170e8707b4355d5319188407efa3d14cc6373 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 21:26:31 +0600
Subject: [PATCH 442/706] now i am gonna start edit page on ChaperForm
---
.../courses/[courseId]/chapters/[chapterId]/page.tsx | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 src/app/api/courses/[courseId]/chapters/[chapterId]/page.tsx
diff --git a/src/app/api/courses/[courseId]/chapters/[chapterId]/page.tsx b/src/app/api/courses/[courseId]/chapters/[chapterId]/page.tsx
new file mode 100644
index 0000000..a338028
--- /dev/null
+++ b/src/app/api/courses/[courseId]/chapters/[chapterId]/page.tsx
@@ -0,0 +1,11 @@
+import React from 'react';
+
+const ChapterIdPage = () => {
+ return (
+
+ Chapterid
+
+ );
+};
+
+export default ChapterIdPage;
\ No newline at end of file
From 89560e12f091c28d3a65304abdd42921440a665a Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 21:29:20 +0600
Subject: [PATCH 443/706] now i am gonna start edit page on ChaperForm
---
.../[courseId]/chapters/[chapterId]/page.tsx | 0
.../[courseId]/chapters/reorder/route.ts | 43 +++++++++++++++++++
.../courses/[courseId]/chapters/route.ts | 41 ++++++++++++++++++
.../[courseId]/components/ChapterForm.tsx | 4 +-
4 files changed, 85 insertions(+), 3 deletions(-)
rename src/app/{api => (platform)/(dashboard)/(routes)/teacher}/courses/[courseId]/chapters/[chapterId]/page.tsx (100%)
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/reorder/route.ts
create mode 100644 src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/route.ts
diff --git a/src/app/api/courses/[courseId]/chapters/[chapterId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
similarity index 100%
rename from src/app/api/courses/[courseId]/chapters/[chapterId]/page.tsx
rename to src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/reorder/route.ts b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/reorder/route.ts
new file mode 100644
index 0000000..29a2df9
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/reorder/route.ts
@@ -0,0 +1,43 @@
+import {auth} from "@clerk/nextjs/server";
+import {NextResponse} from "next/server";
+import {db} from "@/lib/db";
+
+export async function PUT(
+ req: Request,{params}: {params: {courseId: string}}
+){
+ try {
+const {userId} = await auth()
+
+ if(!userId){
+ return new NextResponse('Unauthorized', {status:401})
+ }
+ const {list }= await req.json()
+ const ownCourse = await db.course.findUnique({
+ where: {
+
+ id:params.courseId,
+ userId: userId
+ }
+ })
+ if(!ownCourse){
+ return new NextResponse('Unauthorized', {status:401})
+ }
+
+ for(let item of list){
+ await db.chapter.update({
+
+ where:{id: item.id},
+ data:{position: item.position}
+ })
+ }
+
+ return new NextResponse('Success ',{status: 200})
+
+
+ }catch (error){
+ console.log('[REORDER]', error);
+ return new NextResponse('Internal Server Error', {status: 500})
+ }
+}
+
+
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/route.ts b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/route.ts
new file mode 100644
index 0000000..6cf2a14
--- /dev/null
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/route.ts
@@ -0,0 +1,41 @@
+import { NextResponse } from "next/server";
+import { auth } from "@clerk/nextjs/server";
+import { db } from "@/lib/db";
+
+export async function POST(req: Request, { params }: { params: { courseId: string } }) {
+ try {
+ const { userId } = await auth();
+ const { url, title } = await req.json();
+
+ if (!userId) {
+ return new NextResponse('Unauthorized', { status: 401 });
+ }
+
+ const courseOwner = await db.course.findUnique({
+ where: { id: params.courseId, userId: userId }
+ });
+ if (!courseOwner) {
+ return new NextResponse('Unauthorized', { status: 401 });
+ }
+
+ const lastChapter = await db.chapter.findFirst({
+ where: { courseId: params.courseId },
+ orderBy: { position: 'desc' },
+ });
+
+ const newPosition = lastChapter ? lastChapter.position + 1 : 1;
+
+ const chapter = await db.chapter.create({
+ data: {
+ title,
+ courseId: params.courseId,
+ position: newPosition,
+ }
+ });
+
+ return NextResponse.json(chapter);
+ } catch (err) {
+ console.log('[CHAPTERS]', err);
+ return new NextResponse('Internal server error', { status: 500 });
+ }
+}
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
index 734c266..9360afa 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/components/ChapterForm.tsx
@@ -69,8 +69,6 @@
const onEdit =(id: string) => {
router.push(`/teacher/courses/${courseId}/chapters/${id}`);
-
-
}
return (
@@ -110,7 +108,7 @@
{!isCreating && (
{!initialData.chapters.length ? 'No chapters' : ''}
- {}}
+
From d8c62590c536e6c488007d7a733eecd41184ad3c Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 21:33:25 +0600
Subject: [PATCH 444/706] now i am gonna start edit page on ChaperForm
---
.../[courseId]/chapters/[chapterId]/page.tsx | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
index a338028..eedaa43 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
@@ -1,6 +1,28 @@
import React from 'react';
+import {auth} from "@clerk/nextjs/server";
+import {redirect} from "next/navigation";
+import {db} from "@/lib/db";
+
+
+
+
+const ChapterIdPage =async ({params}: {params:{courseId:string;chapterId:string}}) => {
+
+ const {userId} = await auth()
+ if(!userId){
+ return redirect('/')
+ }
+ const chapter = await db.chapter.findUnique({
+ where: {
+ id: params.chapterId,
+ courseId: params.courseId
+ },
+ include:{
+ muxData: true
+ }
+
+ })
-const ChapterIdPage = () => {
return (
Chapterid
From 390dadc52373a15170d8c613efcd32337dd40593 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 21:36:28 +0600
Subject: [PATCH 445/706] now i am gonna start edit page on ChaperForm
---
.../[courseId]/chapters/[chapterId]/page.tsx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
index eedaa43..572e18d 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
@@ -20,9 +20,21 @@ const ChapterIdPage =async ({params}: {params:{courseId:string;chapterId:string}
include:{
muxData: true
}
-
})
+ if(!chapter){
+
+ return redirect('/')
+ }
+
+ const requiredFields = [
+ chapter.title,
+ chapter.description,
+ chapter.videoUrl,
+ ]
+ const totalFields = requiredFields.length;
+ const completedFields = requiredFields.filter(Boolean).length;
+ const completionText = (`${completedFields}/${totalFields}`)
return (
Chapterid
From 98a5a5614ea9630b5f4869ebf9ef00d74ea854d4 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 21:39:00 +0600
Subject: [PATCH 446/706] now i am gonna start edit page on ChaperForm
---
.../courses/[courseId]/chapters/[chapterId]/page.tsx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
index 572e18d..61586f6 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
@@ -2,6 +2,7 @@ import React from 'react';
import {auth} from "@clerk/nextjs/server";
import {redirect} from "next/navigation";
import {db} from "@/lib/db";
+import Link from "next/link";
@@ -36,7 +37,16 @@ const ChapterIdPage =async ({params}: {params:{courseId:string;chapterId:string}
const completedFields = requiredFields.filter(Boolean).length;
const completionText = (`${completedFields}/${totalFields}`)
return (
-
+
);
From b133b63bcffa14b10c0048c70c83fb406a2a5444 Mon Sep 17 00:00:00 2001
From: yntymakdev
Date: Mon, 17 Feb 2025 21:49:32 +0600
Subject: [PATCH 447/706] customize chapterId page edit
---
.../[courseId]/chapters/[chapterId]/page.tsx | 90 +++++++++----------
1 file changed, 40 insertions(+), 50 deletions(-)
diff --git a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
index 61586f6..cbfde5e 100644
--- a/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
+++ b/src/app/(platform)/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
@@ -1,55 +1,45 @@
-import React from 'react';
-import {auth} from "@clerk/nextjs/server";
-import {redirect} from "next/navigation";
-import {db} from "@/lib/db";
+import React from "react";
+import { auth } from "@clerk/nextjs/server";
+import { redirect } from "next/navigation";
+import { db } from "@/lib/db";
import Link from "next/link";
-
-
-
-const ChapterIdPage =async ({params}: {params:{courseId:string;chapterId:string}}) => {
-
- const {userId} = await auth()
- if(!userId){
- return redirect('/')
- }
- const chapter = await db.chapter.findUnique({
- where: {
- id: params.chapterId,
- courseId: params.courseId
- },
- include:{
- muxData: true
- }
- })
- if(!chapter){
-
- return redirect('/')
- }
-
- const requiredFields = [
- chapter.title,
- chapter.description,
- chapter.videoUrl,
- ]
-
- const totalFields = requiredFields.length;
- const completedFields = requiredFields.filter(Boolean).length;
- const completionText = (`${completedFields}/${totalFields}`)
- return (
-
-
- Chapterid
+const ChapterIdPage = async ({ params }: { params: { courseId: string; chapterId: string } }) => {
+ const { userId } = await auth();
+ if (!userId) {
+ return redirect("/");
+ }
+ const chapter = await db.chapter.findUnique({
+ where: {
+ id: params.chapterId,
+ courseId: params.courseId,
+ },
+ include: {
+ muxData: true,
+ },
+ });
+ if (!chapter) {
+ return redirect("/");
+ }
+
+ const requiredFields = [chapter.title, chapter.description, chapter.videoUrl];
+
+ const totalFields = requiredFields.length;
+ const completedFields = requiredFields.filter(Boolean).length;
+ const completionText = `${completedFields}/${totalFields}`;
+ return (
+