From c32ee2fa60013979cce0514f164852ab93d10344 Mon Sep 17 00:00:00 2001 From: Kawtar Choubari Date: Mon, 25 Sep 2023 17:50:25 +0200 Subject: [PATCH] Fix Later - Run Script only on desktop --- app/blog/page.tsx | 2 +- app/layout.tsx | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/blog/page.tsx b/app/blog/page.tsx index 011c028..2886e20 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -61,7 +61,7 @@ export default function Blog() {

The one and the only place to read my confessions.

{posts?.length ? ( -
+
{posts.map((post, idx) => ( ))} diff --git a/app/layout.tsx b/app/layout.tsx index 301ea99..fd8997b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,7 +4,7 @@ import { Providers } from "@/lib/provider"; import Footer from "@/components/footer"; import { siteConfig } from "@/config/site"; import Analytics from "@/components/analytics"; -import { isDesktop, isMobile } from "react-device-detect"; +import { isDesktop } from "react-device-detect"; export const metadata = { title: siteConfig.name, @@ -63,8 +63,6 @@ export default function RootLayout({ }: { children: React.ReactNode; }) { - console.log("isMobile ", isMobile); - console.log("isDesktop ", isDesktop); return ( {/* TODO: replace with html script tag as the Nextjs Script didn't work */} {/* TODO: load this script only on desktop */} -

- isDesktop{":" + isDesktop}, isMobile{":" + isMobile} -

- {isDesktop && ( + {/* {isDesktop && ( - )} + )} */} );