Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

threadLinksCopy.ts

16 lines553 Bytes

1import type { EnvironmentId } from "@t3tools/contracts";
2import { mFallback, msg } from "gt-i18n";
3import type { MFunctionType } from "gt-i18n/types";
4​
5import type { ThreadLink } from "./threadLinks.ts";
6​
7/** @public */
8export function unknownThreadLinkLabel(
9 link: ThreadLink,
10 messageEnvironmentId: EnvironmentId,
11 resolve: MFunctionType = mFallback,
12): string {
13 return link.environmentId === null || link.environmentId === messageEnvironmentId
14 ? resolve(msg("Thread no longer available"))
15 : resolve(msg("Thread on another machine"));