fix(config): add env for UPLOADER_DATE_FORMAT
This commit is contained in:
parent
d4369d2503
commit
feb75a8a42
3 changed files with 4 additions and 4 deletions
|
@ -46,7 +46,6 @@ export interface ConfigUploader {
|
|||
admin_limit: number;
|
||||
user_limit: number;
|
||||
disabled_extensions: string[];
|
||||
|
||||
format_date: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ export default function readConfig() {
|
|||
map('UPLOADER_ADMIN_LIMIT', 'number', 'uploader.admin_limit'),
|
||||
map('UPLOADER_USER_LIMIT', 'number', 'uploader.user_limit'),
|
||||
map('UPLOADER_DISABLED_EXTENSIONS', 'array', 'uploader.disabled_extensions'),
|
||||
map('UPLOADER_FORMAT_DATE', 'string', 'uploader.format_date'),
|
||||
|
||||
map('URLS_ROUTE', 'string', 'urls.route'),
|
||||
map('URLS_LENGTH', 'number', 'urls.length'),
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { User, userState } from 'lib/recoil/user';
|
||||
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
|
||||
import { userSelector } from 'lib/recoil/user';
|
||||
import { useRecoilState } from 'recoil';
|
||||
import useFetch from './useFetch';
|
||||
|
||||
export default function login() {
|
||||
const router = useRouter();
|
||||
const [user, setUser] = useRecoilState(userState);
|
||||
const [user, setUser] = useRecoilState(userSelector);
|
||||
const [loading, setLoading] = useState(!user);
|
||||
|
||||
async function load() {
|
||||
|
|
Loading…
Reference in a new issue