mirror of
https://github.com/tale/headplane.git
synced 2026-08-31 17:28:14 +00:00
feat: add configuration loading
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user