feat: add configuration loading
This commit is contained in:
parent
fe285b4e6d
commit
5bb2f7dfa3
7 changed files with 551 additions and 6 deletions
18
app/routes/_data.settings._index.tsx
Normal file
18
app/routes/_data.settings._index.tsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { useLoaderData } from '@remix-run/react'
|
||||
|
||||
import { getConfig } from '~/utils/config'
|
||||
|
||||
export async function loader() {
|
||||
const config = await getConfig()
|
||||
return config
|
||||
}
|
||||
|
||||
export default function Page() {
|
||||
const data = useLoaderData<typeof loader>()
|
||||
|
||||
return (
|
||||
<div>
|
||||
{JSON.stringify(data, null, 4)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue