diff --git a/src/app/page.tsx b/src/app/page.tsx index 705e7d3..505daf0 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -30,7 +30,7 @@ const ProjectInfoFormSchema = z.object({ description: z.string().or(z.literal("")) }); -const ProjectInfoForm = ({ form }: { form: UseFormReturn>}) => ( +const ProjectInfoForm = ({ form }: { form: UseFormReturn> }) => ( <> ( @@ -63,10 +63,10 @@ const RenameProjectDialog = ({ project }: { project: Project }) => { }); const handleRenameSubmit = async (data: z.infer) => { - await db.projects.update(project.uuid, { - title: data.title, - description: data.description, - editDate: Date.now() + await db.projects.update(project.uuid, { + title: data.title, + description: data.description, + editDate: Date.now() }); }; @@ -78,7 +78,7 @@ const RenameProjectDialog = ({ project }: { project: Project }) => {
- + @@ -122,10 +122,10 @@ const ProjectDropdown = ({ project }: { project: Project }): ReactNode => { const isMobile = useIsMobile(); const handleDuplicate = async () => { - const newProject = { - ...project, - uuid: generateUUID(), - creationDate: Date.now(), + const newProject = { + ...project, + uuid: generateUUID(), + creationDate: Date.now(), editDate: Date.now(), title: project.title.includes("Copy of") ? project.title : `Copy of ${project.title}`, origin: project.origin @@ -137,39 +137,39 @@ const ProjectDropdown = ({ project }: { project: Project }): ReactNode => {
{project.title} setRenameDialogOpen(true)}> - Rename + Rename
- + console.log("Edit Project")}> - Edit + Edit - Duplicate + Duplicate setDeleteAlertOpen(true)}> - Delete + Delete - + console.log("Project Info")}> - Info + Info
- + - +
); @@ -181,14 +181,14 @@ const ProjectDescription = ({ project }: { project: Project }): ReactNode => {

Project Description

{project.description} -

+

); @@ -203,7 +203,7 @@ const ProjectContainer = ({ return ( -
+

{project.title}

@@ -211,8 +211,8 @@ const ProjectContainer = ({ {project.editDate &&

Last edit date: {date.toLocaleDateString()}, {date.toLocaleTimeString()}

}
- - + +
@@ -251,58 +251,60 @@ export default function Home(): ReactNode { return (
-
- -

Project Library

- {projects && } -
-
-
- - - - - - - - Create New Project - - - Fill in the information about your project. You can change it at any time later. - - - - - - - - - - - - - - - - - +
+
+ +

Project Library

+ {projects && }
-
- - {!isMobile && "Select Projects"} - - setSearch(e.target.value)}/> +
+
+ + + + + + + + Create New Project + + + Fill in the information about your project. You can change it at any time later. + + +
+ + + + + + + + + + + + +
+
+
+
+ + {!isMobile && "Select Projects"} + + setSearch(e.target.value)} /> +
- {projects && projects.map((project) => )} + {projects && projects.map((project) => )}
{(projects != undefined && projects.length == 0) && (
-
+
)}
); diff --git a/src/components/dashboard/Dashboard.tsx b/src/components/dashboard/Dashboard.tsx index ea5369a..446adc6 100644 --- a/src/components/dashboard/Dashboard.tsx +++ b/src/components/dashboard/Dashboard.tsx @@ -32,7 +32,7 @@ const items: DashboardItem[] = [ export const Dashboard = (): ReactNode => { return ( - + diff --git a/src/components/ui/sidebar.tsx b/src/components/ui/sidebar.tsx index b84adf5..2f73f66 100644 --- a/src/components/ui/sidebar.tsx +++ b/src/components/ui/sidebar.tsx @@ -187,7 +187,7 @@ function Sidebar({ data-sidebar="sidebar" data-slot="sidebar" data-mobile="true" - className="bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden" + className={cn("bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden", className)} style={ { "--sidebar-width": SIDEBAR_WIDTH_MOBILE, @@ -199,7 +199,7 @@ function Sidebar({ Sidebar Displays the mobile sidebar. -
{children}
+
{children}
)