From e3e4bde638c46c6a6b729a19be7c7013a6629d41 Mon Sep 17 00:00:00 2001 From: bender Date: Sun, 8 Mar 2026 08:34:36 +0000 Subject: [PATCH 1/5] Add src/app/chef-profile/page.tsx --- src/app/chef-profile/page.tsx | 337 ++++++++++++++++++++++++++++++++++ 1 file changed, 337 insertions(+) create mode 100644 src/app/chef-profile/page.tsx diff --git a/src/app/chef-profile/page.tsx b/src/app/chef-profile/page.tsx new file mode 100644 index 0000000..611f88e --- /dev/null +++ b/src/app/chef-profile/page.tsx @@ -0,0 +1,337 @@ +"use client" + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered'; +import HeroLogoBillboard from '@/components/sections/hero/HeroLogoBillboard'; +import FooterBaseCard from '@/components/sections/footer/FooterBaseCard'; +import { useState } from "react"; +import { Upload, Edit2, Trash2, Play, Pause, MoreVertical } from "lucide-react"; + +interface Video { + id: string; + title: string; + description: string; + thumbnail: string; + duration: string; + uploadDate: string; + views: number; + status: "published" | "draft" | "archived"; +} + +export default function ChefProfilePage() { + const [videos, setVideos] = useState([ + { + id: "1", title: "Signature Skincare Routine", description: "Learn our 5-step skincare routine for glowing skin", thumbnail: "http://img.b2bpic.net/free-photo/model-career-kit-still-life-flat-lay_23-2150218023.jpg", duration: "12:34", uploadDate: "Jan 15, 2025", views: 2543, + status: "published" + }, + { + id: "2", title: "Ingredient Spotlight: Natural Botanicals", description: "Deep dive into our premium organic ingredients", thumbnail: "http://img.b2bpic.net/free-photo/flat-lay-hands-holding-body-care-product-wooden-background_23-2148241876.jpg", duration: "8:45", uploadDate: "Jan 12, 2025", views: 1876, + status: "published" + }, + { + id: "3", title: "Product Application Techniques", description: "Master the art of applying skincare products", thumbnail: "http://img.b2bpic.net/free-photo/product-branding-packaging_23-2150965833.jpg", duration: "15:22", uploadDate: "Jan 10, 2025", views: 3421, + status: "published" + }, + { + id: "4", title: "Winter Skincare Tips", description: "Keep your skin glowing during cold months", thumbnail: "http://img.b2bpic.net/free-photo/woman-applying-moisturizer-her-beauty-routine_23-2150166464.jpg", duration: "10:15", uploadDate: "Jan 8, 2025", views: 0, + status: "draft" + } + ]); + + const [editingId, setEditingId] = useState(null); + const [editData, setEditData] = useState({ title: "", description: "" }); + + const handleEdit = (video: Video) => { + setEditingId(video.id); + setEditData({ title: video.title, description: video.description }); + }; + + const handleSaveEdit = (id: string) => { + setVideos(videos.map(v => + v.id === id ? { ...v, title: editData.title, description: editData.description } : v + )); + setEditingId(null); + }; + + const handleDelete = (id: string) => { + setVideos(videos.filter(v => v.id !== id)); + }; + + const publishedVideos = videos.filter(v => v.status === "published"); + const draftVideos = videos.filter(v => v.status === "draft"); + const totalViews = videos.reduce((sum, v) => sum + v.views, 0); + + return ( + + + +
+ +
+ +
+
+ {/* Stats Section */} +
+
+

Total Videos

+

{videos.length}

+
+
+

Total Views

+

{totalViews.toLocaleString()}

+
+
+

Published

+

{publishedVideos.length}

+
+
+ + {/* Published Videos */} +
+

Published Videos

+
+ {publishedVideos.map(video => ( +
+ {/* Thumbnail */} +
+ {video.title} +
+ +
+
+ {video.duration} +
+
+ + {/* Content */} +
+ {editingId === video.id ? ( +
+ setEditData({...editData, title: e.target.value})} + className="w-full bg-background border border-foreground/20 rounded px-2 py-1 text-foreground text-sm" + /> +