홈화면 배너 처리
This commit is contained in:
@@ -3,10 +3,12 @@ import { create } from 'zustand';
|
||||
import { devtools, persist } from 'zustand/middleware';
|
||||
import { immer } from 'zustand/middleware/immer';
|
||||
import { createUserInfoStore, UserInfoState } from '@/entities/user/model/store';
|
||||
import { createBannerInfoStore, BannerInfoState } from '@/entities/common/model/store';
|
||||
import { StorageKeys } from '@/shared/constants/local-storage';
|
||||
|
||||
export type RootStore = {
|
||||
UserStore: UserInfoState;
|
||||
BannerStore: BannerInfoState;
|
||||
};
|
||||
export const useStore = create<RootStore>()(
|
||||
devtools(
|
||||
@@ -14,6 +16,7 @@ export const useStore = create<RootStore>()(
|
||||
immer(
|
||||
withLenses(() => ({
|
||||
UserStore: createUserInfoStore,
|
||||
BannerStore: createBannerInfoStore,
|
||||
})),
|
||||
),
|
||||
{
|
||||
|
||||
@@ -75,3 +75,6 @@ main {
|
||||
.tab-pane.sub {
|
||||
padding-bottom: unset !important;
|
||||
}
|
||||
.notice-box {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
@@ -15,7 +15,7 @@ export const Menu = ({
|
||||
setMenuOn
|
||||
}: MenuProps) => {
|
||||
const { navigate } = useNavigate();
|
||||
const userInfo = useStore((state) => state.UserStore.UserInfo);
|
||||
const userInfo = useStore((state) => state.UserStore.userInfo);
|
||||
|
||||
const onClickToNavigate = (path: string) => {
|
||||
onClickToMenuClose();
|
||||
|
||||
Reference in New Issue
Block a user