diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..4d29d9da9
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,56 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - '*'
+ pull_request:
+ branches:
+ - '*'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: 'v20.12.2'
+
+ - name: Install dependencies
+ run: npm install
+ working-directory: ./frontend-next-migration
+
+# - name: Lint
+# run: npm run lint
+# working-directory: pages/frontend
+
+ - name: Build
+ run: npm run build
+ working-directory: ./frontend-next-migration
+ env:
+ NEXT_PUBLIC_API_LINK: ${{ secrets.NEXT_PUBLIC_API_LINK }}
+ NEXT_PUBLIC_API_DOMAIN: ${{ secrets.NEXT_PUBLIC_API_DOMAIN }}
+ NEXT_PUBLIC_LOCAL_HOST: ${{ secrets.NEXT_PUBLIC_LOCAL_HOST }}
+
+ - name: Run tests
+ run: npm test
+ working-directory: ./frontend-next-migration
+ env:
+ NEXT_PUBLIC_API_LINK: ${{ secrets.NEXT_PUBLIC_API_LINK }}
+ NEXT_PUBLIC_API_DOMAIN: ${{ secrets.NEXT_PUBLIC_API_DOMAIN }}
+ NEXT_PUBLIC_LOCAL_HOST: ${{ secrets.NEXT_PUBLIC_LOCAL_HOST }}
+
+# - name: Run Cypress tests
+# run: npm run cypress:run
+# env:
+# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
+# working-directory: ./frontend-next-migration
+#
+# - name: Build Storybook
+# run: npm run build-storybook
+# working-directory: ./frontend-next-migration
diff --git a/frontend-next-migration/Dockerfile b/frontend-next-migration/Dockerfile
index f62a55725..e9f948913 100644
--- a/frontend-next-migration/Dockerfile
+++ b/frontend-next-migration/Dockerfile
@@ -60,14 +60,16 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
-EXPOSE 3001
+EXPOSE 3000
#EXPOSE 3000
-ENV PORT 3001
+ENV PORT 3000
#ENV PORT 3000
# set hostname to localhost
ENV HOSTNAME "0.0.0.0"
# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
-CMD ["node", "server.js"]
\ No newline at end of file
+CMD ["node", "server.js"]
+
+#"todo delete"
\ No newline at end of file
diff --git a/frontend-next-migration/README.md b/frontend-next-migration/README.md
index c4033664f..2cdb1f4a2 100644
--- a/frontend-next-migration/README.md
+++ b/frontend-next-migration/README.md
@@ -14,7 +14,7 @@ pnpm dev
bun dev
```
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
diff --git a/frontend-next-migration/__mocks__/svgMock.js b/frontend-next-migration/__mocks__/svgMock.js
new file mode 100644
index 000000000..fe8350a16
--- /dev/null
+++ b/frontend-next-migration/__mocks__/svgMock.js
@@ -0,0 +1,5 @@
+import React from 'react';
+
+const MockSvg = (props) =>
;
+
+export default MockSvg;
\ No newline at end of file
diff --git a/frontend-next-migration/altzone-cli/sortImports.ts b/frontend-next-migration/altzone-cli/sortImports.ts
new file mode 100644
index 000000000..b8529a241
--- /dev/null
+++ b/frontend-next-migration/altzone-cli/sortImports.ts
@@ -0,0 +1 @@
+import { Project } from 'ts-morph';
\ No newline at end of file
diff --git a/frontend-next-migration/jest.config.ts b/frontend-next-migration/jest.config.ts
index 8dc5758c8..3ca421c6e 100644
--- a/frontend-next-migration/jest.config.ts
+++ b/frontend-next-migration/jest.config.ts
@@ -102,6 +102,7 @@ const config: Config = {
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
+ '^.+\\.(svg)$': '/__mocks__/svgMock.js',
'^@/(.*)$': '/src/$1',
},
diff --git a/frontend-next-migration/package-lock.json b/frontend-next-migration/package-lock.json
index d33cc9136..97f969911 100644
--- a/frontend-next-migration/package-lock.json
+++ b/frontend-next-migration/package-lock.json
@@ -74,6 +74,7 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"storybook": "^7.6.17",
+ "ts-morph": "^23.0.0",
"ts-node": "^10.9.2",
"typescript": "^5"
}
@@ -7258,6 +7259,61 @@
"node": ">= 10"
}
},
+ "node_modules/@ts-morph/common": {
+ "version": "0.24.0",
+ "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.24.0.tgz",
+ "integrity": "sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-glob": "^3.3.2",
+ "minimatch": "^9.0.4",
+ "mkdirp": "^3.0.1",
+ "path-browserify": "^1.0.1"
+ }
+ },
+ "node_modules/@ts-morph/common/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/@ts-morph/common/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@ts-morph/common/node_modules/mkdirp": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz",
+ "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "mkdirp": "dist/cjs/src/bin.js"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/@tsconfig/node10": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
@@ -10534,6 +10590,13 @@
"node": ">= 0.12.0"
}
},
+ "node_modules/code-block-writer": {
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.2.tgz",
+ "integrity": "sha512-XfXzAGiStXSmCIwrkdfvc7FS5Dtj8yelCtyOf2p2skCAfvLd6zu0rGzuS9NSCO3bq1JKpFZ7tbKdKlcd5occQA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/collect-v8-coverage": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz",
@@ -23455,6 +23518,17 @@
"node": ">=6.10"
}
},
+ "node_modules/ts-morph": {
+ "version": "23.0.0",
+ "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-23.0.0.tgz",
+ "integrity": "sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@ts-morph/common": "~0.24.0",
+ "code-block-writer": "^13.0.1"
+ }
+ },
"node_modules/ts-node": {
"version": "10.9.2",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
diff --git a/frontend-next-migration/package.json b/frontend-next-migration/package.json
index dd676bae7..ec8b62dff 100644
--- a/frontend-next-migration/package.json
+++ b/frontend-next-migration/package.json
@@ -2,6 +2,9 @@
"name": "frontend-next-migration",
"version": "0.1.0",
"private": true,
+ "bin": {
+ "altzone": "./changemewhenready.ts"
+ },
"scripts": {
"dev": "next dev -p 5173",
"build": "next build",
@@ -12,7 +15,9 @@
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"storybook": "storybook dev -p 6006",
- "build-storybook": "storybook build"
+ "build-storybook": "storybook build",
+
+ "cli": ""
},
"dependencies": {
"@fancyapps/ui": "^5.0.25",
@@ -81,6 +86,7 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"storybook": "^7.6.17",
+ "ts-morph": "^23.0.0",
"ts-node": "^10.9.2",
"typescript": "^5"
}
diff --git a/frontend-next-migration/public/images/background.webp b/frontend-next-migration/public/images/background.webp
new file mode 100644
index 000000000..3ef1a9711
Binary files /dev/null and b/frontend-next-migration/public/images/background.webp differ
diff --git a/frontend-next-migration/public/robots.txt b/frontend-next-migration/public/robots.txt
new file mode 100644
index 000000000..7ed4e7d37
--- /dev/null
+++ b/frontend-next-migration/public/robots.txt
@@ -0,0 +1,4 @@
+User-agent: *
+Disallow:
+
+Sitemap: https://altzone.fi/sitemap.xml
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/(home)/_getPage.ts b/frontend-next-migration/src/app/[lng]/(home)/_getPage.ts
index d9fb23642..91ea0b635 100644
--- a/frontend-next-migration/src/app/[lng]/(home)/_getPage.ts
+++ b/frontend-next-migration/src/app/[lng]/(home)/_getPage.ts
@@ -1,75 +1,60 @@
+import {MainPageProps} from "@/preparedPages/MainPage";
import {useServerTranslation} from "@/shared/i18n";
import {AppExternalLinks} from "@/shared/appLinks/appExternalLinks";
import {RoutePaths} from "@/shared/appLinks/RoutePaths";
-
-export async function _getPage (lng: string){
- const {t} = await useServerTranslation(lng, 'main');
-
-
- const seo = {
- title: t("head-title"),
- description: t("head-description"),
- keywords: t("head-keywords"),
- }
-
- const playWithUs = {
- title: t("playWithUs-title"),
- webGl: {
- title: t('PlayOnline'),
- link: AppExternalLinks.webgl
- },
- googlePLayLink: AppExternalLinks.downloadAndroid,
- belowNavs: [{
- title: t("playWithUs-OpenPositions-title"),
- body: t("playWithUs-OpenPositions-body"),
- link: AppExternalLinks.duunitori,
- isExternal: true
- },
- {
- title: t("playWithUs-BecomeATester-title"),
- body: t("playWithUs-BecomeATester-body"),
- link: AppExternalLinks.discord,
- isExternal: true
- }]
- }
-
-
- const projectDescription = {
- title: t('project-description-title'),
- description: t('project-description-text')
- }
-
- const getToKnowComics = {
- title: t("getToKnowComics-title"),
- buttonParams: { innerText: t("getToKnowComics"), href: RoutePaths.COMICS_GALLERY }
- }
-
- const videoAndGalleries = {
- videoLink: AppExternalLinks.previewVideoYoutube,
- title: t("videoAndGalleries-title")
- }
-
-
- const classifiedHeroesBlocks = {
- title: t("classifiedHeroesBlocks-title"),
- seeMoreLink: {
- text: t("classifiedHeroesBlocks-seeMore"),
- href: RoutePaths.HEROES
- }
- }
-
- const page = {
- playWithUs,
- projectDescription,
- getToKnowComics,
- videoAndGalleries,
- classifiedHeroesBlocks
- }
-
-
- return {
- page,
- seo
- }
-
+import {createPage} from "@/app/_helpers";
+
+export async function _getPage(lng: string) {
+ const { t } = await useServerTranslation(lng, "main");
+
+ return createPage({
+ buildSeo: () => ({
+ title: t("head-title"),
+ description: t("head-description"),
+ keywords: t("head-keywords"),
+ }),
+ buildPage: () => ({
+ playWithUs: {
+ title: t("playWithUs-title"),
+ webGl: {
+ title: t("PlayOnline"),
+ link: AppExternalLinks.webgl,
+ },
+ googlePLayLink: AppExternalLinks.downloadAndroid,
+ belowNavs: [
+ {
+ title: t("playWithUs-OpenPositions-title"),
+ body: t("playWithUs-OpenPositions-body"),
+ link: AppExternalLinks.duunitori,
+ isExternal: true,
+ },
+ {
+ title: t("playWithUs-BecomeATester-title"),
+ body: t("playWithUs-BecomeATester-body"),
+ link: AppExternalLinks.discord,
+ isExternal: true,
+ },
+ ],
+ },
+ projectDescription: {
+ title: t("project-description-title"),
+ description: t("project-description-text"),
+ },
+ getToKnowComics: {
+ title: t("getToKnowComics-title"),
+ buttonParams: { innerText: t("getToKnowComics"), href: RoutePaths.COMICS_GALLERY },
+ },
+ videoAndGalleries: {
+ videoLink: AppExternalLinks.previewVideoYoutube,
+ title: t("videoAndGalleries-title"),
+ },
+ classifiedHeroesBlocks: {
+ title: t("classifiedHeroesBlocks-title"),
+ seeMoreLink: {
+ text: t("classifiedHeroesBlocks-seeMore"),
+ href: RoutePaths.HEROES,
+ },
+ },
+ }),
+ });
}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/(home)/page.tsx b/frontend-next-migration/src/app/[lng]/(home)/page.tsx
index 696850339..75b3707e9 100644
--- a/frontend-next-migration/src/app/[lng]/(home)/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/(home)/page.tsx
@@ -1,22 +1,6 @@
-import {MainPage as PreparedPage} from "@/preparedPages/MainPage";
-import {Metadata} from "next";
+import {MainPage} from "@/preparedPages/MainPage";
import {_getPage} from "./_getPage";
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
-type Props = {
- params: { lng: string }
-}
-
-export async function generateMetadata({ params }: Props): Promise {
- return await _getPage(params.lng).then(r => r.seo);
-}
-
-export default async function MainPage({params}: Props) {
- const {page} = await _getPage(params.lng);
-
- return (
-
- );
-
-}
\ No newline at end of file
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(MainPage, _getPage);
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/about/_getPage.ts b/frontend-next-migration/src/app/[lng]/about/_getPage.ts
new file mode 100644
index 000000000..458631399
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/about/_getPage.ts
@@ -0,0 +1,17 @@
+import {useServerTranslation} from "@/shared/i18n";
+import {createPage} from "@/app/_helpers";
+import {AboutPageProps} from "@/preparedPages/AboutPage";
+
+export async function _getPage (lng: string){
+ const {t} = await useServerTranslation(lng, 'about');
+ return createPage({
+ buildPage: () => ({
+ title: t("title")
+ }),
+ buildSeo: () => ({
+ title: t("head-title"),
+ description: t("head-description"),
+ keywords: t("head-keywords"),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/about/layout.tsx b/frontend-next-migration/src/app/[lng]/about/layout.tsx
new file mode 100644
index 000000000..4586fb28a
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/about/layout.tsx
@@ -0,0 +1,17 @@
+import {ReactNode} from "react";
+import {Navbar} from "@/widgets/Navbar";
+import {Footer} from "@/widgets/Footer";
+
+type Props = {
+ children: ReactNode;
+}
+
+export default function AboutLayout({children}: Props) {
+ return (
+ <>
+
+ {children}
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/about/page.tsx b/frontend-next-migration/src/app/[lng]/about/page.tsx
index 24f001494..528941c51 100644
--- a/frontend-next-migration/src/app/[lng]/about/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/about/page.tsx
@@ -1,35 +1,6 @@
-import { useServerTranslation} from "@/shared/i18n";
-import {Metadata} from "next";
+import {AboutPage} from "@/preparedPages/AboutPage";
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
+import {_getPage} from "./_getPage";
-type Props = {
- params: { lng: string }
-}
-
-// eslint-disable-line react-hooks/rules-of-hooks
-export async function generateMetadata({ params }: Props): Promise {
-
- // eslint-disable-line react-hooks/rules-of-hooks
- const { t } = await useServerTranslation(params.lng, 'about');
-
- return {
- title: t("head-title"),
- description: t("head-description"),
- keywords: t("head-keywords"),
- }
-}
-
-
-export default async function About({ params }: Props) {
-
- const { t } = await useServerTranslation(params.lng, 'about');
-
- return (
-
-
- {
- t("title")
- }
-
-
- )
-}
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(AboutPage, _getPage);
diff --git a/frontend-next-migration/src/app/[lng]/artGame/_getPage.ts b/frontend-next-migration/src/app/[lng]/artGame/_getPage.ts
new file mode 100644
index 000000000..2f4bc0330
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/artGame/_getPage.ts
@@ -0,0 +1,19 @@
+import {createPage} from "@/app/_helpers";
+import {GameArtPageProps} from "@/preparedPages/GameArtPage";
+import {makeArtGameSectionsWithI18n} from "@/entities/PresentationPackages";
+import {useServerTranslation} from "@/shared/i18n";
+
+export async function _getPage (lng: string){
+ const {t} = await useServerTranslation(lng, 'artGame');
+
+ return createPage({
+ buildPage: () => ({
+ sections: makeArtGameSectionsWithI18n(t)
+ }),
+ buildSeo: () => ({
+ title: t("head-title"),
+ description: t("head-description"),
+ keywords: t("head-keywords")
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/artGame/page.tsx b/frontend-next-migration/src/app/[lng]/artGame/page.tsx
index 853ce9fae..41fb3851d 100644
--- a/frontend-next-migration/src/app/[lng]/artGame/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/artGame/page.tsx
@@ -1,26 +1,7 @@
import { GameArtPage } from '@/preparedPages/GameArtPage';
-import { useServerTranslation } from '@/shared/i18n';
-import { Metadata } from 'next';
-import { makeArtGameSectionsWithI18n } from '@/entities/PresentationPackages';
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
+import {_getPage} from "./_getPage";
-type Props = {
- params: { lng: string };
-};
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(GameArtPage, _getPage);
-export async function generateMetadata({ params }: Props): Promise {
- const { t } = await useServerTranslation(params.lng, 'artGame');
-
- return {
- title: t('head-title'),
- description: t('head-description'),
- keywords: t('head-keywords'),
- };
-}
-
-export default async function DefaultPage({ params }: Props) {
- const { t } = await useServerTranslation(params.lng, 'artGame');
-
- const sections = makeArtGameSectionsWithI18n(t);
-
- return ;
-}
diff --git a/frontend-next-migration/src/app/[lng]/auth/login/_getPage.ts b/frontend-next-migration/src/app/[lng]/auth/login/_getPage.ts
new file mode 100644
index 000000000..94d1a71da
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/auth/login/_getPage.ts
@@ -0,0 +1,14 @@
+import {createPage} from "@/app/_helpers";
+import {useServerTranslation} from "@/shared/i18n";
+
+export async function _getPage (lng: string){
+ const {t} = await useServerTranslation(lng, 'auth');
+ return createPage({
+ buildPage: () => ({}),
+ buildSeo: () => ({
+ title: t("auth-login-head-title"),
+ description: t("auth-login-head-description"),
+ keywords: t("auth-login-head-keywords"),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/auth/login/page.tsx b/frontend-next-migration/src/app/[lng]/auth/login/page.tsx
index 50f40e55b..4d7adeb46 100644
--- a/frontend-next-migration/src/app/[lng]/auth/login/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/auth/login/page.tsx
@@ -1,27 +1,8 @@
-import {AuthSubLoginPage as PreparedPage} from "@/preparedPages/AuthPages";
-import {Metadata} from "next";
-import {useServerTranslation} from "@/shared/i18n";
+import {AuthSubLoginPage} from "@/preparedPages/AuthPages";
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
+import {_getPage} from "./_getPage";
-type Props = {
- params: { lng: string }
-}
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(AuthSubLoginPage, _getPage);
-export async function generateMetadata({ params }: Props): Promise {
-
- const { t } = await useServerTranslation(params.lng, 'auth');
-
- return {
- title: t("auth-login-head-title"),
- description: t("auth-login-head-description"),
- keywords: t("auth-login-head-keywords"),
- }
-}
-
-export default async function AuthSubLoginPage() {
- return (
- <>
-
- >
- )
-}
diff --git a/frontend-next-migration/src/app/[lng]/auth/register/_getPage.ts b/frontend-next-migration/src/app/[lng]/auth/register/_getPage.ts
new file mode 100644
index 000000000..73874eb58
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/auth/register/_getPage.ts
@@ -0,0 +1,14 @@
+import {useServerTranslation} from "@/shared/i18n";
+import {createPage} from "@/app/_helpers";
+
+export async function _getPage (lng: string){
+ const {t} = await useServerTranslation(lng, 'auth');
+ return createPage({
+ buildPage: () => ({}),
+ buildSeo: () => ({
+ title: t("auth-register-head-title"),
+ description: t("auth-register-head-description"),
+ keywords: t("auth-register-head-keywords"),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/auth/register/page.tsx b/frontend-next-migration/src/app/[lng]/auth/register/page.tsx
index 5e21c2591..7070fe660 100644
--- a/frontend-next-migration/src/app/[lng]/auth/register/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/auth/register/page.tsx
@@ -1,28 +1,6 @@
-import {AuthSubRegisterPage as PreparedPage} from "@/preparedPages/AuthPages";
-import {Metadata} from "next";
-import {useServerTranslation} from "@/shared/i18n";
+import {AuthSubRegisterPage} from "@/preparedPages/AuthPages";
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
+import {_getPage} from "./_getPage";
-
-type Props = {
- params: { lng: string }
-}
-
-export async function generateMetadata({ params }: Props): Promise {
-
- const { t } = await useServerTranslation(params.lng, 'auth');
-
- return {
- title: t("auth-register-head-title"),
- description: t("auth-register-head-description"),
- keywords: t("auth-register-head-keywords"),
- }
-}
-
-
-export default async function AuthSubRegisterPage() {
- return (
- <>
-
- >
- )
-}
\ No newline at end of file
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(AuthSubRegisterPage, _getPage);
diff --git a/frontend-next-migration/src/app/[lng]/clans/_getPage.ts b/frontend-next-migration/src/app/[lng]/clans/_getPage.ts
new file mode 100644
index 000000000..d4e75628e
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/clans/_getPage.ts
@@ -0,0 +1,15 @@
+import {createPage} from "@/app/_helpers";
+import {useServerTranslation} from "@/shared/i18n";
+
+export async function _getPage (lng: string){
+ const {t} = await useServerTranslation(lng, 'clan');
+
+ return createPage({
+ buildPage: () => ({}),
+ buildSeo: () => ({
+ title: t("head-title"),
+ description: t("head-description"),
+ keywords: t("head-keywords"),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/clans/all/_getPage.ts b/frontend-next-migration/src/app/[lng]/clans/all/_getPage.ts
new file mode 100644
index 000000000..d4e75628e
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/clans/all/_getPage.ts
@@ -0,0 +1,15 @@
+import {createPage} from "@/app/_helpers";
+import {useServerTranslation} from "@/shared/i18n";
+
+export async function _getPage (lng: string){
+ const {t} = await useServerTranslation(lng, 'clan');
+
+ return createPage({
+ buildPage: () => ({}),
+ buildSeo: () => ({
+ title: t("head-title"),
+ description: t("head-description"),
+ keywords: t("head-keywords"),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/clans/all/page.tsx b/frontend-next-migration/src/app/[lng]/clans/all/page.tsx
index a66c9f4c8..a4816b74c 100644
--- a/frontend-next-migration/src/app/[lng]/clans/all/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/clans/all/page.tsx
@@ -1,28 +1,6 @@
-import {ClanAllSubPage as PreparedPage} from "@/preparedPages/ClanPages";
-import {useServerTranslation} from "@/shared/i18n";
-import {Metadata} from "next";
+import {ClanAllSubPage} from "@/preparedPages/ClanPages";
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
+import {_getPage} from "./_getPage";
-
-type Props = {
- params: { lng: string }
-}
-
-
-export default async function ClansAll() {
- return(
- <>
-
- >
- )
-}
-
-export async function generateMetadata({ params }: Props): Promise {
-
- const { t } = await useServerTranslation(params.lng, 'clan');
-
- return {
- title: t("head-title"),
- description: t("head-description"),
- keywords: t("head-keywords"),
- }
-}
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(ClanAllSubPage, _getPage);
diff --git a/frontend-next-migration/src/app/[lng]/clans/page.tsx b/frontend-next-migration/src/app/[lng]/clans/page.tsx
index a66c9f4c8..e958bba59 100644
--- a/frontend-next-migration/src/app/[lng]/clans/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/clans/page.tsx
@@ -1,28 +1,8 @@
-import {ClanAllSubPage as PreparedPage} from "@/preparedPages/ClanPages";
-import {useServerTranslation} from "@/shared/i18n";
-import {Metadata} from "next";
+//todo why this one , when we are in the clans' main page
+import {ClanAllSubPage} from "@/preparedPages/ClanPages";
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
+import {_getPage} from "./_getPage";
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(ClanAllSubPage, _getPage);
-type Props = {
- params: { lng: string }
-}
-
-
-export default async function ClansAll() {
- return(
- <>
-
- >
- )
-}
-
-export async function generateMetadata({ params }: Props): Promise {
-
- const { t } = await useServerTranslation(params.lng, 'clan');
-
- return {
- title: t("head-title"),
- description: t("head-description"),
- keywords: t("head-keywords"),
- }
-}
diff --git a/frontend-next-migration/src/app/[lng]/comics/_getPage.ts b/frontend-next-migration/src/app/[lng]/comics/_getPage.ts
new file mode 100644
index 000000000..adeae2673
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/comics/_getPage.ts
@@ -0,0 +1,17 @@
+import {createPage} from "@/app/_helpers";
+import {ComicsGalleriesPageProps} from "@/preparedPages/ComicsGalleriesPages";
+import {useServerTranslation} from "@/shared/i18n";
+
+export async function _getPage (lng: string){
+ const {t} = await useServerTranslation(lng, 'comics');
+ return createPage({
+ buildPage: () => ({
+ title: t("Comics")
+ }),
+ buildSeo: () => ({
+ title: t("head-title"),
+ description: t("head-description"),
+ keywords: t("head-keywords"),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/comics/layout.tsx b/frontend-next-migration/src/app/[lng]/comics/layout.tsx
new file mode 100644
index 000000000..4c67bcfbc
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/comics/layout.tsx
@@ -0,0 +1,18 @@
+import {ReactNode} from "react";
+import {Navbar} from "@/widgets/Navbar";
+import {Footer} from "@/widgets/Footer";
+import {ScrollTop} from "@/features/ScrollTop";
+
+type Props = {
+ children: ReactNode;
+}
+
+export default function ComicsLayout({children}: Props) {
+ return (
+ <>
+
+ {children}
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/comics/page.tsx b/frontend-next-migration/src/app/[lng]/comics/page.tsx
index cb1afd480..416d998ac 100644
--- a/frontend-next-migration/src/app/[lng]/comics/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/comics/page.tsx
@@ -1,29 +1,6 @@
-import {ComicsGalleriesPage} from "@/preparedPages/ComicsGalleriesPages"
-import {Metadata} from "next";
-import {useServerTranslation} from "@/shared/i18n";
+import {ComicsGalleriesPage} from "@/preparedPages/ComicsGalleriesPages";
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
+import {_getPage} from "./_getPage";
-type Props = {
- params: { lng: string }
-}
-
-
-export async function generateMetadata({ params }: Props): Promise {
-
- const { t } = await useServerTranslation(params.lng, 'comics');
-
- return {
- title: t("head-title"),
- description: t("head-description"),
- keywords: t("head-keywords"),
- }
-}
-
-
-export default async function Comics({ params }: Props) {
-
- return (
- <>
-
- >
- )
-}
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(ComicsGalleriesPage, _getPage);
diff --git a/frontend-next-migration/src/app/[lng]/cookies/_getPage.ts b/frontend-next-migration/src/app/[lng]/cookies/_getPage.ts
new file mode 100644
index 000000000..206def1d3
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/cookies/_getPage.ts
@@ -0,0 +1,18 @@
+import {createPage} from "@/app/_helpers";
+import {CookiesPageProps} from "@/preparedPages/CookiesPage";
+import {makeCookiesSectionsWithI18n} from "@/entities/PresentationPackages";
+import {useServerTranslation} from "@/shared/i18n";
+
+export async function _getPage (lng: string){
+ const { t } = await useServerTranslation(lng, 'cookies');
+ return createPage({
+ buildPage: () => ({
+ sections: makeCookiesSectionsWithI18n(t)
+ }),
+ buildSeo: () => ({
+ title: t('head-title'),
+ description: t('head-description'),
+ keywords: t('head-keywords'),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/cookies/page.tsx b/frontend-next-migration/src/app/[lng]/cookies/page.tsx
index 9a9020b1d..8cc465a19 100644
--- a/frontend-next-migration/src/app/[lng]/cookies/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/cookies/page.tsx
@@ -1,26 +1,6 @@
import { CookiesPage } from '@/preparedPages/CookiesPage';
-import { useServerTranslation } from '@/shared/i18n';
-import { Metadata } from 'next';
-import { makeCookiesSectionsWithI18n } from '@/entities/PresentationPackages';
+import {withPageData,createMetadataGenerator} from "src/app/_helpers";
+import {_getPage} from "./_getPage";
-type Props = {
- params: { lng: string };
-};
-
-export async function generateMetadata({ params }: Props): Promise {
- const { t } = await useServerTranslation(params.lng, 'cookies');
-
- return {
- title: t('head-title'),
- description: t('head-description'),
- keywords: t('head-keywords'),
- };
-}
-
-export default async function DefaultPage({ params }: Props) {
- const { t } = await useServerTranslation(params.lng, 'cookies');
-
- const sections = makeCookiesSectionsWithI18n(t);
-
- return ;
-}
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(CookiesPage, _getPage);
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/dashboard/[id]/page.tsx b/frontend-next-migration/src/app/[lng]/dashboard/[id]/page.tsx
deleted file mode 100644
index 50397ffc5..000000000
--- a/frontend-next-migration/src/app/[lng]/dashboard/[id]/page.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client'
-// app/dashboard/[id].tsx
-import {useParams} from 'next/navigation';
-import {useSelector} from "react-redux";
-import {selectProfile} from "@/entities/Auth";
-import {useGetAllDirectoryPhotosQuery} from "@/entities/Gallery";
-
-export default function DashboardPage() {
-
- const profile = useSelector(selectProfile);
-
- const test = useGetAllDirectoryPhotosQuery({parentDirectory: "comics"})
-
- console.log(test);
-
-
- const params = useParams()
-
- const id = params?.id;
-
- return content from id: {id}
;
-}
diff --git a/frontend-next-migration/src/app/[lng]/dashboard/layout.tsx b/frontend-next-migration/src/app/[lng]/dashboard/layout.tsx
deleted file mode 100644
index 99b7f4c09..000000000
--- a/frontend-next-migration/src/app/[lng]/dashboard/layout.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function DashBoardLayout({ children } : any) {
- return ;
-}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/dashboard/page.tsx b/frontend-next-migration/src/app/[lng]/dashboard/page.tsx
deleted file mode 100644
index d2c2b33ab..000000000
--- a/frontend-next-migration/src/app/[lng]/dashboard/page.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Page() {
- return Hello, from dashboard
;
-}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/data-policy/_getPage.ts b/frontend-next-migration/src/app/[lng]/data-policy/_getPage.ts
new file mode 100644
index 000000000..9c408c717
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/data-policy/_getPage.ts
@@ -0,0 +1,37 @@
+import {createPage} from "@/app/_helpers";
+import {DataPolicyPageProps} from "@/preparedPages/DataPolicyPage";
+import {useServerTranslation} from "@/shared/i18n";
+
+export async function _getPage (lng: string){
+ // todo add it
+ const { t } = await useServerTranslation(lng, 'data-policy');
+ return createPage({
+ //todo add translations!
+ buildPage: () => ({
+ title: "Data Policy",
+ text: "Under GDPR, you have the following rights:\n" +
+ "\n" +
+ "Access to Data: You can request a copy of the personal data we hold about you.\n" +
+ "Rectification: You can request the correction of inaccurate or incomplete data.\n" +
+ "Erasure: You can request the deletion of your personal data (\"right to be forgotten\").\n" +
+ "Restriction of Processing: You can request the restriction of processing your data in certain circumstances.\n" +
+ "Data Portability: You can request that your personal data be provided to you or another data controller in a structured, commonly used, and machine-readable format.\n" +
+ "Right to Object: You can object to the processing of your personal data, particularly if the processing is based on legitimate interest or for direct marketing purposes.\n" +
+ "\n" +
+ "You can exercise these rights by contacting us via email at proyaleg@gmail.com .\n" +
+ "\n" +
+ "If you believe your data has been processed unlawfully, you have the right to file a complaint with a supervisory authority.\n" +
+ "\n" +
+ "\n" +
+ "We retain your personal data for as long as it is necessary to fulfill the purposes described above or until you request the deletion of your data. " +
+ "You can request the deletion of your data at any time by sending an informal request via email to proyaleg@gmail.com. Upon such a request," +
+ " all data related to you will be permanently and irrevocably deleted unless there is a legal requirement to retain the data."
+ }),
+ //todo add seo translations!
+ buildSeo: () => ({
+ title: t('head-title'),
+ description: t('head-description'),
+ keywords: t('head-keywords'),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/data-policy/layout.tsx b/frontend-next-migration/src/app/[lng]/data-policy/layout.tsx
new file mode 100644
index 000000000..08d0c85b4
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/data-policy/layout.tsx
@@ -0,0 +1,19 @@
+import {ReactNode} from "react";
+import {Navbar} from "@/widgets/Navbar";
+import {Footer} from "@/widgets/Footer";
+import {ScrollTop} from "@/features/ScrollTop";
+
+type Props = {
+ children: ReactNode;
+}
+
+export default function Layout({children}: Props) {
+ return (
+ <>
+
+ {children}
+
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/data-policy/page.tsx b/frontend-next-migration/src/app/[lng]/data-policy/page.tsx
new file mode 100644
index 000000000..deafe8020
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/data-policy/page.tsx
@@ -0,0 +1,9 @@
+import {DataPolicyPage} from "@/preparedPages/DataPolicyPage";
+import {withPageData ,
+ // createMetadataGenerator
+} from "@/app/_helpers";
+import {_getPage} from "./_getPage"
+
+// todo add after adding i18n
+// export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(DataPolicyPage, _getPage);
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/heroes/[title]/_getPage.ts b/frontend-next-migration/src/app/[lng]/heroes/[title]/_getPage.ts
new file mode 100644
index 000000000..9edd6f864
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/heroes/[title]/_getPage.ts
@@ -0,0 +1,70 @@
+import {createPage} from "@/app/_helpers";
+import {useServerTranslation} from "@/shared/i18n";
+import {heroes} from "@/entities/Hero";
+import {RoutePaths} from "@/shared/appLinks/RoutePaths";
+import {notFound} from "next/navigation";
+
+export async function _getPage (lng: string, title: string){
+
+ const { t } = await useServerTranslation(lng, 'heroes');
+ const currentIndex = heroes.findIndex(hero => hero.title === title);
+
+ const prevHeroTitle = findPrevTitle(currentIndex);
+ const nextHeroTitle = findNextTitle(currentIndex);
+
+ const selectedHero = getHeroData(title, t);
+ const prevHeroLink = generateHeroLink(prevHeroTitle);
+ const nextHeroLink = generateHeroLink(nextHeroTitle);
+
+ const notFoundBoolean = !selectedHero || !nextHeroTitle || !prevHeroTitle;
+
+ if (notFoundBoolean) {
+ notFound();
+ }
+
+ return createPage({
+ buildPage: () => ({
+ selectedHero:{selectedHero},
+ prevHeroLink:{prevHeroLink},
+ nextHeroLink:{nextHeroLink}
+ }),
+ buildSeo: () => ({
+ title: t('head-title'),
+ description: t('head-description'),
+ keywords: t('head-keywords'),
+ })
+ });
+}
+
+
+function getHeroData(heroTitle: string, t: (key: string) => string ) {
+ const hero = heroes.find(h => h.title === heroTitle);
+ return hero
+ ? {
+ id: hero.id,
+ img: hero.srcImg as unknown as string,
+ title: t(`${hero.title}`),
+ alt: t(`${hero.alt}`),
+ heroColor: hero.color,
+ description: t(`${hero.description}`),
+ borderColor: hero.borderColor,
+ imgGif: hero?.srcGif as unknown as string,
+ group: hero?.group
+ }
+ : null;
+}
+
+function findNextTitle(currentIndex: number): string {
+ const nextIndex = currentIndex === heroes.length - 1 ? 0 : currentIndex + 1;
+ return heroes[nextIndex]?.title;
+}
+
+function findPrevTitle(currentIndex: number): string {
+ const previousIndex =
+ currentIndex === 0 ? heroes.length - 1 : currentIndex - 1;
+ return heroes[previousIndex]?.title;
+}
+
+function generateHeroLink(heroTitle: string): string {
+ return RoutePaths.HEROES_ONE.replace(':id', heroTitle);
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/heroes/[title]/page.tsx b/frontend-next-migration/src/app/[lng]/heroes/[title]/page.tsx
index f8a1e705d..374ff39ce 100644
--- a/frontend-next-migration/src/app/[lng]/heroes/[title]/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/heroes/[title]/page.tsx
@@ -3,14 +3,18 @@ import {useServerTranslation} from "@/shared/i18n";
import {heroes} from "@/entities/Hero";
import {RoutePaths} from "@/shared/appLinks/RoutePaths";
import { notFound } from 'next/navigation';
+// import {withPageData ,createMetadataGenerator} from "@/app/_helpers";
+// import {_getPage} from "./_getPage";
-type Props = {
- params: {
+interface Props extends DefaultAppRouterProps {
+ params: DefaultAppRouterProps['params'] & {
title: string;
- lng: string;
};
-};
+}
+
+// @ts-ignore todo figure out why it doesnt work properly and refactor after it and add createMetadataGenerator
+// export default withPageData(PreparedHeroPage, _getPage);
export default async function HeroPage({ params }: Props) {
const { title, lng } = params;
diff --git a/frontend-next-migration/src/app/[lng]/heroes/_getPage.ts b/frontend-next-migration/src/app/[lng]/heroes/_getPage.ts
new file mode 100644
index 000000000..d0af838f3
--- /dev/null
+++ b/frontend-next-migration/src/app/[lng]/heroes/_getPage.ts
@@ -0,0 +1,14 @@
+import {createPage} from "@/app/_helpers";
+import {useServerTranslation} from "@/shared/i18n";
+
+export async function _getPage (lng: string){
+ const { t } = await useServerTranslation(lng, 'heroes');
+ return createPage({
+ buildPage: () => ({}),
+ buildSeo: () => ({
+ title: t("head-title"),
+ description: t("head-description"),
+ keywords: t("head-keywords"),
+ })
+ });
+}
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/heroes/layout.tsx b/frontend-next-migration/src/app/[lng]/heroes/layout.tsx
index 74fbf67ba..e85de8c50 100644
--- a/frontend-next-migration/src/app/[lng]/heroes/layout.tsx
+++ b/frontend-next-migration/src/app/[lng]/heroes/layout.tsx
@@ -1,17 +1,18 @@
import {Navbar} from "@/widgets/Navbar";
import { Footer } from '@/widgets/Footer';
import {ReactNode} from "react";
+import {HorizontalLines} from "@/shared/ui/HorizontalLines";
interface Props {
children?: ReactNode;
}
-
export default function Layout({ children}: Props) {
return (
<>
- {children}
+ {children}
+
>
)
diff --git a/frontend-next-migration/src/app/[lng]/heroes/page.tsx b/frontend-next-migration/src/app/[lng]/heroes/page.tsx
index d9e765076..bed8eb79e 100644
--- a/frontend-next-migration/src/app/[lng]/heroes/page.tsx
+++ b/frontend-next-migration/src/app/[lng]/heroes/page.tsx
@@ -1,26 +1,6 @@
-import {Metadata} from "next";
-import {useServerTranslation} from "@/shared/i18n";
-import { HeroesPage as PreparedHeroesPage } from "@/preparedPages/HeroesPages";
+import { HeroesPage} from "@/preparedPages/HeroesPages";
+import {withPageData,createMetadataGenerator} from "@/app/_helpers";
+import {_getPage} from "./_getPage";
-type Props = {
- params: { lng: string }
-}
-
-
-export async function generateMetadata({ params }: Props): Promise {
-
- const { t } = await useServerTranslation(params.lng, 'heroes');
-
- return {
- title: t("head-title"),
- description: t("head-description"),
- keywords: t("head-keywords"),
- }
-}
-
-
-export default async function HeroesPage({ params }: Props) {
- return (
-
- )
-}
\ No newline at end of file
+export const generateMetadata = createMetadataGenerator(_getPage);
+export default withPageData(HeroesPage, _getPage);
\ No newline at end of file
diff --git a/frontend-next-migration/src/app/[lng]/layout.tsx b/frontend-next-migration/src/app/[lng]/layout.tsx
index a77f04112..034b4a9e6 100644
--- a/frontend-next-migration/src/app/[lng]/layout.tsx
+++ b/frontend-next-migration/src/app/[lng]/layout.tsx
@@ -1,4 +1,4 @@
-import type { Metadata } from 'next';
+import type {Metadata, Viewport} from 'next';
import { Open_Sans, Urbanist, Rubik } from 'next/font/google';
import '../_styles/index.scss';
import {Providers} from "../_providers";
@@ -24,6 +24,7 @@ const rubik = Rubik({
variable: '--font-family-texts',
});
+// todo add i18n if it possible
export const metadata: Metadata = {
title: 'AltZone',
description:
@@ -33,6 +34,13 @@ export const metadata: Metadata = {
};
+export const viewport: Viewport = {
+ width: 'device-width',
+ initialScale: 1,
+ maximumScale: 1,
+ userScalable: false,
+}
+
export async function generateStaticParams() {
return languages.map((lng) => ({ lng }));
@@ -50,20 +58,22 @@ export default function RootLayout({
lang={lng}
dir={dir(lng)}
className={`${urbanist.variable} ${rubik.variable}`}>
-
-
-
+
+
-
-
-
- {children}
-
-
+ />
+
+
+
+ {children}
+
+