MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / CustomLinkHelper

Function CustomLinkHelper

packages/utilities/src/custom-link.ts:7–23  ·  view source on GitHub ↗
({
  isSubDomainRouting,
  path,
  communityName,
  communityType,
}: {
  isSubDomainRouting: boolean;
  path: string;
  communityName: string;
  communityType: 'discord' | 'slack' | 'linen';
})

Source from the content-addressed store, hash-verified

5};
6
7export function CustomLinkHelper({
8 isSubDomainRouting,
9 path,
10 communityName,
11 communityType,
12}: {
13 isSubDomainRouting: boolean;
14 path: string;
15 communityName: string;
16 communityType: 'discord' | 'slack' | 'linen';
17}) {
18 if (isSubDomainRouting) {
19 return path;
20 } else {
21 return `/${communityMapping[communityType]}/${communityName}${path}`;
22 }
23}

Callers 9

ChannelForBotsFunction · 0.90
CustomLinkFunction · 0.90
CustomRouterPushFunction · 0.90
CustomTableRowLinkFunction · 0.90
ContentFunction · 0.90
BreadcrumbFunction · 0.90
PageFunction · 0.90
LatestFunction · 0.90
usePathFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected