From 65cbdf0588ccedf14ba26bb437c42591ae4842a9 Mon Sep 17 00:00:00 2001 From: xHomu Date: Fri, 22 Nov 2024 14:23:51 -0800 Subject: [PATCH 1/4] Update link-view.tsx --- app/routes/_editor+/blocks+/link/link-view.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/routes/_editor+/blocks+/link/link-view.tsx b/app/routes/_editor+/blocks+/link/link-view.tsx index 89e45dc5..8476daa1 100644 --- a/app/routes/_editor+/blocks+/link/link-view.tsx +++ b/app/routes/_editor+/blocks+/link/link-view.tsx @@ -13,13 +13,11 @@ type Props = { }; export function BlockLinkView({ element, children }: Props) { - const { hostname } = new URL(element?.url as string); - const { site } = useSiteLoaderData(); const isSelfLink = site?.domain - ? hostname === site?.domain - : hostname === "mana.wiki"; + ? element?.url?.includes(site?.domain) + : element?.url?.includes("mana.wiki"); if (element.icon) { return ( From 4a500e0914de7c3b6efc5eb02bb61eb938cd00fb Mon Sep 17 00:00:00 2001 From: xHomu Date: Mon, 25 Nov 2024 16:13:00 -0800 Subject: [PATCH 2/4] Update RampUnit.tsx --- app/routes/_site+/_components/RampUnit.tsx | 55 +++++++++++----------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/app/routes/_site+/_components/RampUnit.tsx b/app/routes/_site+/_components/RampUnit.tsx index 59dd309c..2aab4023 100644 --- a/app/routes/_site+/_components/RampUnit.tsx +++ b/app/routes/_site+/_components/RampUnit.tsx @@ -116,40 +116,39 @@ export function AdUnit({ } }, [startDetect, enableAds]); - if (!enableAds) return <>; + if (!enableAds) return
; // set Default height to fix ad cls, only in production when adblock is not detected if (!detected && process.env.NODE_ENV === "production") className = className + " h-[250px] tablet:h-[90px]"; return ( - }> - {() => ( - <> - {!detected && deviceType.isMobile && adType.mobile ? ( - - ) : undefined} - {!detected && deviceType.isTablet && adType.tablet ? ( - - ) : undefined} - {!detected && deviceType.isDesktop && adType.desktop ? ( - - ) : undefined} - - )} - +
+ }> + {() => ( + <> + {!detected && deviceType.isMobile && adType.mobile && ( + + )} + {!detected && deviceType.isTablet && adType.tablet && ( + + )} + {!detected && deviceType.isDesktop && adType.desktop && ( + + )} + + )} + +
); } From 24a2c9f7426da6d671bf72456b665c04179e2bca Mon Sep 17 00:00:00 2001 From: Nick Winters Date: Mon, 25 Nov 2024 16:36:31 -1000 Subject: [PATCH 3/4] Update _layout.tsx --- app/routes/_site+/_layout.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/routes/_site+/_layout.tsx b/app/routes/_site+/_layout.tsx index 25b04d73..72f92dd8 100644 --- a/app/routes/_site+/_layout.tsx +++ b/app/routes/_site+/_layout.tsx @@ -115,10 +115,9 @@ export default function SiteLayout() { )} Date: Mon, 25 Nov 2024 19:18:10 -0800 Subject: [PATCH 4/4] Update RampUnit.tsx --- app/routes/_site+/_components/RampUnit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/_site+/_components/RampUnit.tsx b/app/routes/_site+/_components/RampUnit.tsx index 2aab4023..a3d3cfa3 100644 --- a/app/routes/_site+/_components/RampUnit.tsx +++ b/app/routes/_site+/_components/RampUnit.tsx @@ -116,7 +116,7 @@ export function AdUnit({ } }, [startDetect, enableAds]); - if (!enableAds) return
; + if (!enableAds) return <>; // set Default height to fix ad cls, only in production when adblock is not detected if (!detected && process.env.NODE_ENV === "production")