Add APP_TITLE env variable
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIRECTUS_API_URL=
|
||||
APP_TITLE=
|
||||
|
||||
+10
-4
@@ -1,10 +1,12 @@
|
||||
import {createDirectus, rest, readItems} from '@directus/sdk'
|
||||
import {Typography} from '@mui/material'
|
||||
import Container from '@mui/material/Container'
|
||||
import Typography from '@mui/material/Typography'
|
||||
import {formatKonstitisyon} from '../lib/format.js'
|
||||
|
||||
async function getData() {
|
||||
const apiUrl = process.env.DIRECTUS_API_URL
|
||||
const apiUrl = process.env.DIRECTUS_API_URL
|
||||
const appTitle = process.env.APP_TITLE
|
||||
|
||||
async function getData() {
|
||||
if (!apiUrl) {
|
||||
throw new Error('DIRECTUS_API_URL is required')
|
||||
}
|
||||
@@ -41,5 +43,9 @@ export default async function Page() {
|
||||
|
||||
console.log('data', data)
|
||||
|
||||
return <Typography variant='h1'>konstitisyon.la</Typography>
|
||||
return (
|
||||
<Container maxWidth='sm'>
|
||||
<Typography component='h1' textAlign='center' variant='h3'>{appTitle.toUpperCase()}</Typography>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user