cleanup view-document styling in jsx
This commit is contained in:
parent
23a850253b
commit
f07f4789ee
2 changed files with 8 additions and 9 deletions
|
@ -63,7 +63,7 @@ const Document = ({ skeleton, ...props }: Props) => {
|
|||
return (
|
||||
<>
|
||||
<div className={styles.card}>
|
||||
<div className={styles.fileNameContainer}>
|
||||
<div>
|
||||
<Skeleton width={"100%"} height={36} />
|
||||
</div>
|
||||
<div className={styles.documentContainer}>
|
||||
|
|
|
@ -20,10 +20,8 @@ export const config = (env: Environment): Config => {
|
|||
return true
|
||||
} else if (str === "false" || str === "0") {
|
||||
return false
|
||||
} else if (str) {
|
||||
throw new Error(`Invalid boolean value: ${str}`)
|
||||
} else {
|
||||
return false
|
||||
return Boolean(str)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,8 +57,11 @@ export const config = (env: Environment): Config => {
|
|||
const is_production = env.NODE_ENV === "production"
|
||||
|
||||
const developmentDefault = (name: string, defaultValue: string): string => {
|
||||
if (is_production) return throwIfUndefined(name)
|
||||
return defaultIfUndefined(name, defaultValue)
|
||||
if (is_production) {
|
||||
return throwIfUndefined(name)
|
||||
} else {
|
||||
return defaultIfUndefined(name, defaultValue)
|
||||
}
|
||||
}
|
||||
|
||||
validNodeEnvs(env.NODE_ENV)
|
||||
|
@ -77,9 +78,7 @@ export const config = (env: Environment): Config => {
|
|||
github_client_id: env.GITHUB_CLIENT_ID ?? "",
|
||||
github_client_secret: env.GITHUB_CLIENT_SECRET ?? "",
|
||||
nextauth_secret: throwIfUndefined("NEXTAUTH_SECRET"),
|
||||
credential_auth: stringToBoolean(
|
||||
developmentDefault("CREDENTIAL_AUTH", "true")
|
||||
)
|
||||
credential_auth: stringToBoolean("CREDENTIAL_AUTH")
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue