From 2b7713085d59d7046a419df5731c180418a46739 Mon Sep 17 00:00:00 2001 From: corgifist Date: Wed, 30 Jul 2025 01:10:22 +0300 Subject: [PATCH] no more tag duplication in layouts --- src/app/(dashboard)/page.tsx | 6 ++++-- src/app/(editor)/editor/[uuid]/layout.tsx | 25 +++++++---------------- src/app/layout.tsx | 6 +----- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/src/app/(dashboard)/page.tsx b/src/app/(dashboard)/page.tsx index 53a3064..59921c3 100644 --- a/src/app/(dashboard)/page.tsx +++ b/src/app/(dashboard)/page.tsx @@ -1,5 +1,5 @@ "use client"; -import { createContext, Dispatch, ReactNode, SetStateAction, useContext, useState } from "react"; +import { createContext, Dispatch, forwardRef, ReactNode, SetStateAction, useContext, useState } from "react"; import { useLiveQuery } from "dexie-react-hooks"; import { addProject, db, deleteProject } from "@/lib/db"; import { Label } from "@/components/ui/label"; @@ -435,7 +435,9 @@ const ProjectContainer = ({ return selecting ? projectComponent - : ({projectComponent}); + : () => { + if ((e.target as HTMLDivElement).getAttribute("data-selectable") != "true") e.preventDefault(); + }}>{projectComponent}); }; export default function Home(): ReactNode { diff --git a/src/app/(editor)/editor/[uuid]/layout.tsx b/src/app/(editor)/editor/[uuid]/layout.tsx index b503443..bb30ebe 100644 --- a/src/app/(editor)/editor/[uuid]/layout.tsx +++ b/src/app/(editor)/editor/[uuid]/layout.tsx @@ -34,24 +34,13 @@ export const viewport: Viewport = { export default async function RootLayout({ children, }: Readonly<{ - children: ReactNode; + children: ReactNode }>) { return ( - - - - - - - -
- - {children} - -
- -
- - +
+ + {children} + +
); -} +} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index ca14b5a..0bd66f6 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -44,11 +44,7 @@ export default async function RootLayout({ -
- - {children} - -
+ {children}