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

Function CustomRouterPush

apps/web/components/Link/CustomRouterPush.tsx:4–23  ·  view source on GitHub ↗
({
  isSubDomainRouting,
  communityName,
  communityType,
}: {
  isSubDomainRouting: boolean;
  communityName: string;
  communityType: 'discord' | 'slack' | 'linen';
})

Source from the content-addressed store, hash-verified

2import { CustomLinkHelper } from '@linen/utilities/custom-link';
3
4export default function CustomRouterPush({
5 isSubDomainRouting,
6 communityName,
7 communityType,
8}: {
9 isSubDomainRouting: boolean;
10 communityName: string;
11 communityType: 'discord' | 'slack' | 'linen';
12}) {
13 return ({ path }: { path: string }) => {
14 Router.push(
15 CustomLinkHelper({
16 communityType,
17 communityName,
18 isSubDomainRouting,
19 path,
20 })
21 );
22 };
23}

Callers 3

PageLayoutFunction · 0.85
onNewMessageFunction · 0.85
onSubmitFunction · 0.85

Calls 1

CustomLinkHelperFunction · 0.90

Tested by

no test coverage detected