Skip to content

Commit 6f15245

Browse files
committed
code review
1 parent 507a474 commit 6f15245

File tree

15 files changed

+35
-21
lines changed

15 files changed

+35
-21
lines changed

apps/site/components/Downloads/DownloadLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { FC, PropsWithChildren } from 'react';
44

55
import LinkWithArrow from '#site/components/LinkWithArrow';
66
import { useClientContext } from '#site/hooks';
7-
import type { NodeRelease } from '#site/types';
8-
import { getNodeDownloadUrl, type DownloadKind } from '#site/util/download';
7+
import type { DownloadKind, NodeRelease } from '#site/types';
8+
import { getNodeDownloadUrl } from '#site/util/download';
99
import { getUserPlatform } from '#site/util/userAgent';
1010

1111
type DownloadLinkProps = { release: NodeRelease; kind?: DownloadKind };

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useContext } from 'react';
55

66
import DownloadLinkBase from '#site/components/Downloads/DownloadLink';
77
import { ReleaseContext } from '#site/providers/releaseProvider';
8-
import type { DownloadKind } from '#site/util/download';
8+
import type { DownloadKind } from '#site/types/download';
99

1010
type DownloadLinkProps = { kind?: DownloadKind };
1111

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { FC } from 'react';
77

88
import { useClientContext } from '#site/hooks';
99
import { ReleaseContext } from '#site/providers/releaseProvider';
10-
import type { UserOS } from '#site/types/userOS';
10+
import type { UserOS } from '#site/types/userAgent';
1111
import { nextItem, OPERATING_SYSTEMS, parseCompat } from '#site/util/download';
1212

1313
type OperatingSystemDropdownProps = { exclude?: Array<UserOS> };

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useEffect, useContext, useMemo } from 'react';
77

88
import { useClientContext } from '#site/hooks';
99
import { ReleaseContext } from '#site/providers/releaseProvider';
10-
import type { UserPlatform } from '#site/types/userOS';
10+
import type { UserPlatform } from '#site/types/userAgent';
1111
import { PLATFORMS, nextItem, parseCompat } from '#site/util/download';
1212
import { getUserPlatform } from '#site/util/userAgent';
1313

apps/site/hooks/react-client/useDetectOS.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
import { useEffect, useState } from 'react';
44

5-
import type { UserArchitecture, UserBitness, UserOS } from '#site/types/userOS';
5+
import type {
6+
UserArchitecture,
7+
UserBitness,
8+
UserOS,
9+
} from '#site/types/userAgent';
610
import { getHighEntropyValues, detectOS } from '#site/util/userAgent';
711

812
type UserOSState = {

apps/site/hooks/react-client/useNavigationState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { RefObject } from 'react';
44
import { useContext, useEffect } from 'react';
55

66
import { NavigationStateContext } from '#site/providers/navigationStateProvider';
7-
import { debounce } from '#site/util/misc';
7+
import { debounce } from '#site/util/objects';
88

99
const useNavigationState = <T extends HTMLElement>(
1010
id: string,

apps/site/i18n.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getRequestConfig } from 'next-intl/server';
44

55
import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs';
66

7-
import { deepMerge } from './util/misc';
7+
import { deepMerge } from './util/objects';
88

99
// Loads the Application Locales/Translations Dynamically
1010
const loadLocaleDictionary = async (locale: string) => {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ export interface DownloadSnippet {
33
language: string;
44
content: string;
55
}
6+
7+
export type DownloadKind = 'installer' | 'binary' | 'source';

apps/site/types/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ export * from './server';
1111
export * from './github';
1212
export * from './calendar';
1313
export * from './author';
14-
export * from './downloads';
14+
export * from './download';
15+
export * from './userAgent';

apps/site/types/release.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { DownloadSnippet } from '#site/types/downloads';
1+
import type { DownloadSnippet } from '#site/types/download';
22
import type { NodeRelease } from '#site/types/releases';
3-
import type { UserOS, UserPlatform } from '#site/types/userOS';
3+
import type { UserOS, UserPlatform } from '#site/types/userAgent';
44

55
export type InstallationMethod =
66
| 'NVM'

0 commit comments

Comments
 (0)