Skip to content

Commit 27f2631

Browse files
committed
improve casting
1 parent 75bc5ef commit 27f2631

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

apps/site/components/Downloads/Release/ReleaseCodeBox.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
ReleaseContext,
1616
ReleasesContext,
1717
} from '#site/providers/releaseProvider';
18-
import type { IntlMessageKeys } from '#site/types/i18n';
1918
import type { ReleaseContextType } from '#site/types/release';
2019
import { INSTALL_METHODS } from '#site/util/downloadUtils';
2120

@@ -145,7 +144,7 @@ const ReleaseCodeBox: FC = () => {
145144

146145
<span className="text-center text-xs text-neutral-800 dark:text-neutral-200">
147146
<Skeleton loading={renderSkeleton} hide={!currentPlatform}>
148-
{t(info as IntlMessageKeys, { platform: label })}{' '}
147+
{t(info, { platform: label })}{' '}
149148
{t.rich('layouts.download.codeBox.externalSupportInfo', {
150149
platform: label,
151150
link: text => (

apps/site/util/downloadUtils/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ type DownloadCompatibility = {
3333
};
3434

3535
type DownloadDropdownItem<T extends string> = {
36-
label: string;
36+
label: IntlMessageKeys;
3737
recommended?: boolean;
3838
url?: string;
39-
info?: string;
39+
info?: IntlMessageKeys;
4040
compatibility: DownloadCompatibility;
4141
} & Omit<SelectValue<T>, 'label'>;
4242

@@ -116,7 +116,7 @@ export const INSTALL_METHODS = installMethods.map(method => ({
116116
iconImage: createIcon(InstallMethodIcons, method.icon),
117117
recommended: method.recommended,
118118
url: method.url,
119-
info: method.info,
119+
info: method.info as IntlMessageKeys,
120120
compatibility: {
121121
...method.compatibility,
122122
os: method.compatibility?.os?.map(os => os as UserOS),
@@ -143,7 +143,7 @@ export const PLATFORMS = Object.fromEntries(
143143
Object.entries(systems).map(([key, data]) => [
144144
key,
145145
data.platforms.map(platform => ({
146-
label: platform.label as IntlMessageKeys,
146+
label: platform.label,
147147
value: platform.value as UserPlatform,
148148
compatibility: platform.compatibility || {},
149149
})),

0 commit comments

Comments
 (0)