공지사항 /홈 / 리스트 / 상세
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { getLocalStorage } from '@/shared/lib';
|
||||
import { StorageKeys } from '@/shared/constants/local-storage';
|
||||
@@ -14,22 +15,22 @@ import {
|
||||
useSetFooterMode,
|
||||
useSetFooterCurrentPage
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import moment from 'moment';
|
||||
|
||||
export const HomePage = () => {
|
||||
const { callLogin } = useUserInfo();
|
||||
|
||||
useSetHeaderTitle('');
|
||||
useSetHeaderType(HeaderType.Home);
|
||||
useSetFooterMode(true);
|
||||
useSetFooterCurrentPage(FooterItemActiveKey.Home);
|
||||
|
||||
const { callLogin } = useUserInfo();
|
||||
|
||||
const today = moment().format('YYYYMMDD').toString();
|
||||
let bannerToday = getLocalStorage(StorageKeys.BottomBannerClose);
|
||||
|
||||
const [bottomBannerOn, setBottomBannerOn] = useState<boolean>(false);
|
||||
const [authRegisterOn, setAuthRegisterOn] = useState<boolean>(false);
|
||||
|
||||
const [loginSuccess, setLoginSuccess] = useState<boolean>(false);
|
||||
|
||||
/*
|
||||
const userParmas = {
|
||||
id: 'thenaun12',
|
||||
@@ -43,8 +44,11 @@ export const HomePage = () => {
|
||||
};
|
||||
|
||||
const handleLogin = useCallback(async () =>{
|
||||
await callLogin(userParmas);
|
||||
callLogin(userParmas).then(() => {
|
||||
setLoginSuccess(true);
|
||||
});
|
||||
}, []);
|
||||
|
||||
const checkBottomBannerOpen = () => {
|
||||
if(!!bannerToday){
|
||||
bannerToday = bannerToday.toString();
|
||||
@@ -90,7 +94,9 @@ export const HomePage = () => {
|
||||
<div className="tab-content blue">
|
||||
<div className="tab-pane dashboard active">
|
||||
<FavoriteWrapper></FavoriteWrapper>
|
||||
<DayStatusBox></DayStatusBox>
|
||||
{ !!loginSuccess &&
|
||||
<DayStatusBox></DayStatusBox>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user