Skip to content

Commit

Permalink
test deploy 01
Browse files Browse the repository at this point in the history
  • Loading branch information
eliawk committed Sep 21, 2023
1 parent 582e8e3 commit 04a31e1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
3 changes: 2 additions & 1 deletion app/hooks/useLocalizeLink.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useTranslation } from 'react-i18next'

import routes from '../pages/_routes.js'
const routes = require('../pages/_routes.js')
// import routes from '~/pages/_routes.js'

export const useLocalizeLink = () => {
const { i18n } = useTranslation()
Expand Down
3 changes: 2 additions & 1 deletion app/pages/_routes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// const global_routes = require('./global_routes.js')
// const skialper_routes = require('./skialper_routes.js')
const skialper_routes = require('./skialper_routes.js')

const allRoutes = [...skialper_routes]

export default allRoutes
module.exports = allRoutes
3 changes: 2 additions & 1 deletion app/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import routes from './pages/_routes.js'
// import routes from './pages/_routes.js'
const routes = require('~/pages/_routes.js')

export function validateEmail(email: unknown): email is string {
return typeof email === 'string' && email.length > 3 && email.includes('@')
Expand Down
28 changes: 16 additions & 12 deletions remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/** @type {import('@remix-run/dev').AppConfig} */
// Import routes.js
// const routes = require('./app/pages/_routes.js')
const routes = require('./app/pages/_routes.js')
// import routes from './app/pages/skialper_routes.js'
console.log(routes)

module.exports = {
cacheDirectory: './node_modules/.cache/remix',
Expand Down Expand Up @@ -31,18 +33,20 @@ module.exports = {
// If you need to do async work, do it before calling `defineRoutes`, we use
// the call stack of `route` inside to set nesting.

// const routes = require('./app/pages/_routes.mjs')

return defineRoutes((route) => {
route('/about', 'pages/skialper/about._index.tsx')
// routes.forEach((r) => {
// route(r.path, r.component, {
// id: `it-${r.path}`,
// })
// })
// routes.forEach((r) => {
// route(r.originalPath, r.component, {
// id: `en-${r.originalPath}`,
// })
// })
// route('/about', 'pages/skialper/about._index.tsx')
routes.forEach((r) => {
route(r.path, r.component, {
id: `it-${r.path}`,
})
})
routes.forEach((r) => {
route(r.originalPath, r.component, {
id: `en-${r.originalPath}`,
})
})
})
},
}

0 comments on commit 04a31e1

Please sign in to comment.