Skip to content

Commit 4e7e141

Browse files
committed
fix LinkFormat + revalidate=0
1 parent 7649309 commit 4e7e141

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/links/group-additional-links.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
Switch,
2020
} from "@dub/ui";
2121
import { PenWriting, Trash } from "@dub/ui/icons";
22-
import { cn } from "@dub/utils";
22+
import { cn, getApexDomain, getPrettyUrl, getUrlFromString } from "@dub/utils";
2323
import { PropsWithChildren, useState } from "react";
2424
import { useForm } from "react-hook-form";
2525
import { toast } from "sonner";
@@ -285,6 +285,8 @@ function LinkFormat({
285285
onConfirm: deleteLinkFormat,
286286
});
287287

288+
const linkUrl = getUrlFromString(`${link.domain}${link.path}`);
289+
288290
return (
289291
<>
290292
{confirmModal}
@@ -299,7 +301,7 @@ function LinkFormat({
299301
</div>
300302
<div className="relative z-10 p-2">
301303
<LinkLogo
302-
apexDomain={link.domain}
304+
apexDomain={getApexDomain(linkUrl)}
303305
className="size-4 sm:size-6"
304306
imageProps={{
305307
loading: "lazy",
@@ -308,8 +310,7 @@ function LinkFormat({
308310
</div>
309311
</div>
310312
<span className="text-content-default min-w-0 truncate text-sm font-semibold">
311-
{link.domain}
312-
{link.path === "/" ? "" : link.path}
313+
{getPrettyUrl(linkUrl)}
313314
</span>
314315
</div>
315316

apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { IntegrationsList } from "./integrations-list";
22

3-
export const revalidate = 300; // 5 minutes
3+
export const revalidate = 0;
44

55
export default function IntegrationsPage() {
66
return <IntegrationsList />;

0 commit comments

Comments
 (0)