-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose the config on the settings page
- Loading branch information
Showing
11 changed files
with
85 additions
and
43 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
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
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
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
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
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
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
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
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
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,32 @@ | ||
import { useEffect, useState } from 'react' | ||
|
||
function ConfigPanel () { | ||
const [settings, setSettings] = useState({}) | ||
|
||
useEffect(() => { | ||
fetch('/api/settings').then((res) => res.json()).then((settings) => { | ||
setSettings(settings) | ||
}) | ||
}, []) | ||
|
||
return ( | ||
<> | ||
<div className='bg-white p-6 rounded shadow-lg max-w-6xl w-full'> | ||
<h3 className='text-3xl text-center'>Config</h3> | ||
<h4 className='text-sm text-center text-gray-400 pb-4'> | ||
This can be changed in the application.yaml on the server | ||
</h4> | ||
<div className='flex flex-col gap-4'> | ||
{Object.keys(settings).map((key) => ( | ||
<div key={key} className='flex justify-between'> | ||
<div className='font-bold'>{key}</div> | ||
<div>{settings[key]}</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default ConfigPanel |
This file was deleted.
Oops, something went wrong.