fix(org): Get design list from hook
This commit is contained in:
parent
57f5d84e9c
commit
30ea70b29b
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
import { nsMerge } from 'shared/utils.mjs'
|
import { nsMerge } from 'shared/utils.mjs'
|
||||||
import { designList } from 'shared/config/designs.mjs'
|
import { collection } from 'site/hooks/use-design.mjs'
|
||||||
import { siteConfig } from 'site/site.config.mjs'
|
import { siteConfig } from 'site/site.config.mjs'
|
||||||
// Hooks
|
// Hooks
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
|
@ -53,7 +53,7 @@ export async function getStaticProps({ locale, params }) {
|
||||||
* To learn more, see: https://nextjs.org/docs/basic-features/data-fetching
|
* To learn more, see: https://nextjs.org/docs/basic-features/data-fetching
|
||||||
*/
|
*/
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const enPaths = [...designList].map((design) => `/designs/${design}`)
|
const enPaths = [...collection].map((design) => `/designs/${design}`)
|
||||||
const paths = [...enPaths]
|
const paths = [...enPaths]
|
||||||
for (const lang of siteConfig.languages.filter((lang) => lang !== 'en')) {
|
for (const lang of siteConfig.languages.filter((lang) => lang !== 'en')) {
|
||||||
paths.push(...enPaths.map((path) => `/${lang}${path}`))
|
paths.push(...enPaths.map((path) => `/${lang}${path}`))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue