diff --git a/src/lib/config/Config.ts b/src/lib/config/Config.ts index ba7d389..7d23dab 100644 --- a/src/lib/config/Config.ts +++ b/src/lib/config/Config.ts @@ -46,7 +46,6 @@ export interface ConfigUploader { admin_limit: number; user_limit: number; disabled_extensions: string[]; - format_date: string; } diff --git a/src/lib/config/readConfig.ts b/src/lib/config/readConfig.ts index c5e5fee..a3505ff 100644 --- a/src/lib/config/readConfig.ts +++ b/src/lib/config/readConfig.ts @@ -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'), diff --git a/src/lib/hooks/useLogin.ts b/src/lib/hooks/useLogin.ts index 2d42cf2..b218f7d 100644 --- a/src/lib/hooks/useLogin.ts +++ b/src/lib/hooks/useLogin.ts @@ -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() {