-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configured next-i18n, removed app router in favour of using pages sys…
…tem. changed pages to JS
- Loading branch information
1 parent
b606901
commit 8be8f72
Showing
9 changed files
with
47 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @type {import('next-i18next').UserConfig} */ | ||
module.exports = { | ||
i18n: { | ||
defaultLocale: "en", | ||
locales: ["en"], | ||
}, | ||
}; |
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,4 +1,9 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
|
||
module.exports = nextConfig | ||
const { i18n } = require("./next-i18next.config"); | ||
|
||
const nextConfig = { | ||
i18n, | ||
}; | ||
|
||
module.exports = nextConfig; |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { AppProps } from "next/app"; | ||
import { appWithTranslation } from "next-i18next"; | ||
|
||
function MyApp({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} />; | ||
} | ||
|
||
export default appWithTranslation(MyApp); |
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,18 @@ | ||
import { serverSideTranslations } from "next-i18next/serverSideTranslations"; | ||
|
||
export async function getStaticProps({ locale }) { | ||
return { | ||
props: { | ||
...(await serverSideTranslations(locale, ["common", "footer"])), | ||
// Will be passed to the page component as props | ||
}, | ||
}; | ||
} | ||
|
||
export default function Home() { | ||
return ( | ||
<> | ||
<p>Stormhacks 2024 is coming!</p> | ||
</> | ||
); | ||
} |
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