-
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 #515 from DorijanH/feature/nextjs-app-router
feat: Migrated to the app router
- Loading branch information
Showing
37 changed files
with
6,086 additions
and
6,479 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import IndexView from '../../views/IndexView/IndexView'; | ||
|
||
/** | ||
* Function representing the HomePage component. | ||
* | ||
* @returns HomePage component | ||
*/ | ||
export default function HomePage() { | ||
return <IndexView />; | ||
} |
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,19 @@ | ||
import PokemonDetailsView from '../../../../../views/PokemonDetailsView/PokemonDetailsView'; | ||
|
||
/** | ||
* Pokemon details page metadata. | ||
* | ||
* @type {import('next').Metadata} | ||
*/ | ||
export const metadata = { | ||
title: 'Pokemon details' | ||
}; | ||
|
||
/** | ||
* Function representing the PokemonDetailsPage component. | ||
* | ||
* @returns PokemonDetailsPage component | ||
*/ | ||
export default function PokemonDetailsPage() { | ||
return <PokemonDetailsView />; | ||
} |
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,19 @@ | ||
import PokemonsView from '../../../../views/PokemonsView/PokemonsView'; | ||
|
||
/** | ||
* Pokemons page metadata. | ||
* | ||
* @type {import('next').Metadata} | ||
*/ | ||
export const metadata = { | ||
title: 'Pokemons' | ||
}; | ||
|
||
/** | ||
* Function representing the PokemonsPage component. | ||
* | ||
* @returns PokemonsPage component | ||
*/ | ||
export default function PokemonsPage() { | ||
return <PokemonsView />; | ||
} |
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,15 @@ | ||
import UserInformation from '../../../components/UserInformation/UserInformation'; | ||
|
||
/** | ||
* Function representing the PokemonsLayout component. | ||
* | ||
* @returns PokemonsLayout component | ||
*/ | ||
export default function PokemonsLayout({ children }) { | ||
return ( | ||
<> | ||
<UserInformation /> | ||
{children} | ||
</> | ||
); | ||
} |
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,12 @@ | ||
'use client'; | ||
|
||
import InternalServerError from '../views/InternalServerErrorView/InternalServerErrorView'; | ||
|
||
/** | ||
* Function representing the ErrorPage component. | ||
* | ||
* @returns ErrorPage component | ||
*/ | ||
export default function ErrorPage() { | ||
return <InternalServerError />; | ||
} |
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,50 @@ | ||
import ThemeRegistry from '../components/Providers/ThemeRegistry/ThemeRegistry'; | ||
import { roboto } from '../config/fonts'; | ||
import '../styles/global.scss'; | ||
|
||
// Checks whether the app is running in a production or development mode | ||
const isProduction = process.env.NODE_ENV === 'production'; | ||
|
||
/** | ||
* Page metadata. | ||
* | ||
* @type {import('next').Metadata} | ||
*/ | ||
export const metadata = { | ||
title: { | ||
default: `React starter ${isProduction ? '' : '- development'}`, | ||
template: `%s ${isProduction ? '' : '- development'}` | ||
}, | ||
description: "Enterwell's template for web apps based on the React and Next.js.", | ||
icons: { | ||
icon: [ | ||
{ | ||
media: '(prefers-color-scheme: light)', | ||
url: '/icons/logo.svg', | ||
href: '/icons/logo.svg' | ||
}, | ||
{ | ||
media: '(prefers-color-scheme: dark)', | ||
url: '/icons/logo-dark.svg', | ||
href: '/icons/logo-dark.svg' | ||
} | ||
] | ||
} | ||
}; | ||
|
||
/** | ||
* Function representing the RootLayout component. | ||
* | ||
* @returns RootLayout component | ||
*/ | ||
export default function RootLayout({ children }) { | ||
return ( | ||
<html lang="en" suppressHydrationWarning> | ||
<body className={roboto.className}> | ||
<ThemeRegistry> | ||
{children} | ||
</ThemeRegistry> | ||
</body> | ||
</html> | ||
); | ||
} |
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,10 @@ | ||
import NotFoundView from '../views/NotFoundView/NotFoundView'; | ||
|
||
/** | ||
* Function representing the NotFoundPage component. | ||
* | ||
* @returns NotFoundPage component | ||
*/ | ||
export default function NotFoundPage() { | ||
return <NotFoundView />; | ||
} |
Oops, something went wrong.