Skip to content

Commit

Permalink
Update _link.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
xHomu committed Mar 26, 2024
1 parent 997a64d commit 98b5682
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions app/routes/_editor+/blocks+/link/_link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,6 @@ type Fields = {
};

export function BlockLink({ element, children }: Props) {
let { hostname, pathname } = new URL(element.url as string);
const { site } = useSiteLoaderData();

const isSelfLink = site?.domain
? hostname === site?.domain
: hostname === "mana.wiki";

let url = element.url && new URL(element.url).pathname;
let pathSection = url && url.split("/");

const canFetch = element.icon == undefined;

const linkDataQuery = qs.stringify(
Expand Down Expand Up @@ -311,16 +301,6 @@ export function BlockLink({ element, children }: Props) {
</span>
);
}
if (isSelfLink) {
return (
<Link
className="text-blue-600 visited:text-purple-600 hover:underline dark:text-blue-500"
to={pathname}
>
{children}
</Link>
);
}

return (
<a
Expand Down

0 comments on commit 98b5682

Please sign in to comment.