Skip to content

Commit 563f9eb

Browse files
authored
meta: new proposal for imports (#8362)
1 parent 1cff540 commit 563f9eb

File tree

247 files changed

+465
-302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+465
-302
lines changed

apps/site/app/[locale]/[...path]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
*/
99

1010
import { notFound } from 'next/navigation';
11-
import type { FC } from 'react';
1211

1312
import { ENABLE_STATIC_EXPORT } from '#site/next.constants.mjs';
1413
import { ENABLE_STATIC_EXPORT_LOCALE } from '#site/next.constants.mjs';
1514
import { dynamicRouter } from '#site/next.dynamic.mjs';
1615
import * as basePage from '#site/next.dynamic.page.mjs';
1716
import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs';
17+
1818
import type { DynamicParams } from '#site/types';
19+
import type { FC } from 'react';
1920

2021
type PageParams = DynamicParams<{ path: Array<string> }>;
2122

apps/site/app/[locale]/blog/[...path]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { notFound } from 'next/navigation';
2-
import type { FC } from 'react';
32

43
import { ENABLE_STATIC_EXPORT } from '#site/next.constants.mjs';
54
import { BLOG_DYNAMIC_ROUTES } from '#site/next.dynamic.constants.mjs';
65
import * as basePage from '#site/next.dynamic.page.mjs';
76
import { defaultLocale } from '#site/next.locales.mjs';
7+
88
import type { DynamicParams } from '#site/types';
9+
import type { FC } from 'react';
910

1011
type PageParams = DynamicParams<{ path: Array<string> }>;
1112

apps/site/app/[locale]/download/archive/[version]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { notFound, redirect } from 'next/navigation';
2-
import type { FC } from 'react';
32

43
import provideReleaseData from '#site/next-data/providers/releaseData';
54
import provideReleaseVersions from '#site/next-data/providers/releaseVersions';
65
import { ENABLE_STATIC_EXPORT } from '#site/next.constants.mjs';
76
import * as basePage from '#site/next.dynamic.page.mjs';
87
import { defaultLocale } from '#site/next.locales.mjs';
8+
99
import type { DynamicParams } from '#site/types';
10+
import type { FC } from 'react';
1011

1112
type PageParams = DynamicParams<{ version: string }>;
1213

apps/site/app/[locale]/error.tsx

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

33
import { ArrowRightIcon } from '@heroicons/react/24/solid';
44
import { useTranslations } from 'next-intl';
5-
import type { FC } from 'react';
65

76
import Button from '#site/components/Common/Button';
87
import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop';
98

9+
import type { FC } from 'react';
10+
1011
const ErrorPage: FC<{ error: Error }> = () => {
1112
const t = useTranslations();
1213

apps/site/app/[locale]/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import { Analytics } from '@vercel/analytics/react';
22
import { SpeedInsights } from '@vercel/speed-insights/next';
33
import classNames from 'classnames';
44
import { NextIntlClientProvider } from 'next-intl';
5-
import type { FC, PropsWithChildren } from 'react';
65

76
import BaseLayout from '#site/layouts/Base';
87
import { VERCEL_ENV } from '#site/next.constants.mjs';
98
import { IBM_PLEX_MONO, OPEN_SANS } from '#site/next.fonts';
109
import { availableLocalesMap, defaultLocale } from '#site/next.locales.mjs';
1110
import { ThemeProvider } from '#site/providers/themeProvider';
1211

12+
import type { FC, PropsWithChildren } from 'react';
13+
1314
import '#site/styles/index.css';
1415

1516
const fontClasses = classNames(IBM_PLEX_MONO.variable, OPEN_SANS.variable);

apps/site/app/[locale]/not-found.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
import { ArrowRightIcon } from '@heroicons/react/24/solid';
44
import { getTranslations } from 'next-intl/server';
5-
import type { FC } from 'react';
65

76
import Button from '#site/components/Common/Button';
87
import Turtle from '#site/components/Common/Turtle';
98
import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop';
109

10+
import type { FC } from 'react';
11+
1112
const NotFoundPage: FC = async () => {
1213
const t = await getTranslations();
1314

apps/site/app/[locale]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { notFound } from 'next/navigation';
2-
import type { FC } from 'react';
32

43
import { ENABLE_STATIC_EXPORT } from '#site/next.constants.mjs';
54
import { ENABLE_STATIC_EXPORT_LOCALE } from '#site/next.constants.mjs';
65
import * as basePage from '#site/next.dynamic.page.mjs';
76
import { availableLocaleCodes } from '#site/next.locales.mjs';
87
import { defaultLocale } from '#site/next.locales.mjs';
8+
99
import type { DynamicParams } from '#site/types';
10+
import type { FC } from 'react';
1011

1112
type PageParams = DynamicParams<{ path: Array<string> }>;
1213

apps/site/app/global-error.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
'use client';
22

33
import { ArrowRightIcon } from '@heroicons/react/24/solid';
4-
import type { FC } from 'react';
54

65
import Button from '#site/components/Common/Button';
76
import BaseLayout from '#site/layouts/Base';
87
import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop';
98

9+
import type { FC } from 'react';
10+
1011
const GlobalErrorPage: FC<{ error: Error }> = () => (
1112
<html>
1213
<body>

apps/site/app/sitemap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import type { MetadataRoute } from 'next';
2-
31
import { BASE_PATH } from '#site/next.constants.mjs';
42
import { BASE_URL } from '#site/next.constants.mjs';
53
import { EXTERNAL_LINKS_SITEMAP } from '#site/next.constants.mjs';
64
import { BLOG_DYNAMIC_ROUTES } from '#site/next.dynamic.constants.mjs';
75
import { dynamicRouter } from '#site/next.dynamic.mjs';
86
import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs';
97

8+
import type { MetadataRoute } from 'next';
9+
1010
// This is the combination of the Application Base URL and Base PATH
1111
const baseUrlAndPath = `${BASE_URL}${BASE_PATH}`;
1212

apps/site/client-context.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { cache } from 'react';
22

3-
import type { ClientSharedServerContext } from '#site/types';
43
import { assignClientContext } from '#site/util/context';
54

5+
import type { ClientSharedServerContext } from '#site/types';
6+
67
// This allows us to have Server-Side Context's of the shared "contextual" data
78
// which includes the frontmatter, the current pathname from the dynamic segments
89
// and the current headings of the current markdown context

0 commit comments

Comments
 (0)