Skip to content

Commit

Permalink
Merge branch 'manawiki:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
xHomu authored Nov 27, 2024
2 parents 4b4c681 + 7c7298b commit 0ae948f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 33 deletions.
6 changes: 2 additions & 4 deletions app/routes/_editor+/blocks+/link/link-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
53 changes: 26 additions & 27 deletions app/routes/_site+/_components/RampUnit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,33 +123,32 @@ export function AdUnit({
className = className + " h-[250px] tablet:h-[90px]";

return (
<ClientOnly fallback={<div className={className} />}>
{() => (
<>
{!detected && deviceType.isMobile && adType.mobile ? (
<AdUnitSelector
adType={adType.mobile}
selectorId={selectorId}
className={className}
/>
) : undefined}
{!detected && deviceType.isTablet && adType.tablet ? (
<AdUnitSelector
adType={adType.tablet}
selectorId={selectorId}
className={className}
/>
) : undefined}
{!detected && deviceType.isDesktop && adType.desktop ? (
<AdUnitSelector
adType={adType.desktop}
selectorId={selectorId}
className={className}
/>
) : undefined}
</>
)}
</ClientOnly>
<div className={className}>
<ClientOnly fallback={<></>}>
{() => (
<>
{!detected && deviceType.isMobile && adType.mobile && (
<AdUnitSelector
adType={adType.mobile}
selectorId={selectorId}
/>
)}
{!detected && deviceType.isTablet && adType.tablet && (
<AdUnitSelector
adType={adType.tablet}
selectorId={selectorId}
/>
)}
{!detected && deviceType.isDesktop && adType.desktop && (
<AdUnitSelector
adType={adType.desktop}
selectorId={selectorId}
/>
)}
</>
)}
</ClientOnly>
</div>
);
}

Expand Down
3 changes: 1 addition & 2 deletions app/routes/_site+/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ export default function SiteLayout() {
<RampInit adWebId={adWebId} />
)}
<AdUnit
className="fixed bottom-0 left-0 w-full h-[50px] z-50 bg-3 flex items-center justify-center"
className="tablet:hidden fixed bottom-0 left-0 w-full h-[50px] z-50 bg-3 flex items-center justify-center"
enableAds={enableAds}
adType={{
tablet: "leaderboard_btf",
mobile: "leaderboard_btf",
}}
selectorId="mobileBottomSticky"
Expand Down

0 comments on commit 0ae948f

Please sign in to comment.