-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #544 from VitNode/rebuild_frontend_for_next_15
perf!: Update to NextJS 15.0.0-canary.177+ & next-intl 3.21.0-canary
- Loading branch information
Showing
74 changed files
with
2,050 additions
and
2,160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// ! DO NOT TOUCH THIS FILE!!! IT IS GENERATED BY VITNODE-CLI | ||
// ! If you remove this then default page plugin will not work | ||
import React from 'react'; | ||
import { TranslationsProvider } from 'vitnode-frontend/components/translations-provider'; | ||
import { getSessionData } from 'vitnode-frontend/graphql/get-session-data'; | ||
import { generateMetadataDefaultPage } from 'vitnode-frontend/views/theme/views/default-page'; | ||
|
||
export const generateMetadata = generateMetadataDefaultPage; | ||
|
||
export default async function Page() { | ||
const { | ||
core_sessions__authorization: { plugin_default }, | ||
} = await getSessionData(); | ||
|
||
const PageFromTheme = React.lazy(async () => | ||
import(`@/plugins/${plugin_default}/templates/default-page`).then( | ||
module => ({ | ||
default: module.default, | ||
}), | ||
), | ||
); | ||
|
||
return ( | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-expect-error | ||
<TranslationsProvider namespaces={`${plugin_default}.home`}> | ||
<PageFromTheme /> | ||
</TranslationsProvider> | ||
); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ThemeLayout } from 'vitnode-frontend/views/theme/layout/theme-layout'; | ||
|
||
export default function LocaleLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return <ThemeLayout>{children}</ThemeLayout>; | ||
} |
6 changes: 2 additions & 4 deletions
6
apps/frontend/src/app/[locale]/error.tsx → ...pp/[locale]/(main)/(layout)/not-found.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
'use client'; | ||
|
||
import { ErrorView } from 'vitnode-frontend/views/theme/views/error/error-view'; | ||
|
||
export default function Error() { | ||
return <ErrorView code="500" />; | ||
export default function NotFoundPage() { | ||
return <ErrorView code="404" />; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import React from 'react'; | ||
import { TranslationsProvider } from 'vitnode-frontend/components/translations-provider'; | ||
import { AuthLayout } from 'vitnode-frontend/views/layout/auth/auth-layout'; | ||
import { ThemeLayout } from 'vitnode-frontend/views/theme/layout/theme-layout'; | ||
|
||
import './global.css'; | ||
|
||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<AuthLayout> | ||
<ThemeLayout>{children}</ThemeLayout> | ||
</AuthLayout> | ||
<TranslationsProvider namespaces={[]}> | ||
<AuthLayout>{children}</AuthLayout> | ||
</TranslationsProvider> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/[code]/dev/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
// ! DO NOT TOUCH THIS FILE!!! IT IS GENERATED BY VITNODE-CLI | ||
import { | ||
DevPluginAdminLayout, | ||
DevPluginAdminLayoutProps, | ||
generateMetadataDevPluginAdminLayout, | ||
} from 'vitnode-frontend/admin/core/plugins/views/dev/layout/layout'; | ||
|
||
export const generateMetadata = generateMetadataDevPluginAdminLayout; | ||
|
||
export default function Layout(props: DevPluginAdminLayoutProps) { | ||
export default function Layout( | ||
props: React.ComponentProps<typeof DevPluginAdminLayout>, | ||
) { | ||
return <DevPluginAdminLayout {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
// ! DO NOT TOUCH THIS FILE!!! IT IS GENERATED BY VITNODE-CLI | ||
import React from 'react'; | ||
import 'vitnode-frontend/admin/css'; | ||
import { TranslationsProvider } from 'vitnode-frontend/components/translations-provider'; | ||
|
||
export default async function Layout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return children; | ||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<TranslationsProvider namespaces={[]}>{children}</TranslationsProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { getRequestConfig } from 'next-intl/server'; | ||
import { i18nConfigVitNode } from 'vitnode-frontend/i18n'; | ||
|
||
export default getRequestConfig(async ({ requestLocale }) => { | ||
const config = await i18nConfigVitNode({ | ||
pathsToMessagesFromPlugins: async ({ plugin, locale }) => { | ||
return await import(`./plugins/${plugin}/langs/${locale}.json`); | ||
}, | ||
requestLocale, | ||
}); | ||
|
||
return config; | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.