홈화면 배너 처리
This commit is contained in:
@@ -8,8 +8,12 @@ export const DEFAULT_PAGE_PARAM = {
|
||||
};
|
||||
|
||||
export const FilterMotionVariants = {
|
||||
hidden: {x: '100%'},
|
||||
visible: {x: '0%'},
|
||||
hidden: {
|
||||
x: '100%'
|
||||
},
|
||||
visible: {
|
||||
x: '0%'
|
||||
},
|
||||
};
|
||||
export const FilterMotionDuration = {
|
||||
duration: 0.3
|
||||
@@ -20,8 +24,12 @@ export const FilterMotionStyle = {
|
||||
};
|
||||
|
||||
export const BottomSheetMotionVaiants = {
|
||||
hidden: { y: '100%' },
|
||||
visible: { y: '0%' },
|
||||
hidden: {
|
||||
y: '100%'
|
||||
},
|
||||
visible: {
|
||||
y: '0%'
|
||||
},
|
||||
};
|
||||
export const BottomSheetMotionDuration = {
|
||||
duration: 0.3
|
||||
|
||||
26
src/entities/common/model/store.ts
Normal file
26
src/entities/common/model/store.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { lens } from '@dhmk/zustand-lens';
|
||||
import { SetStateAction } from 'react';
|
||||
import { BannerInfo } from './types';
|
||||
|
||||
export interface BannerInfoState {
|
||||
bannerInfo: BannerInfo;
|
||||
setBannerInfo: (update: SetStateAction<Partial<BannerInfo>>) => void;
|
||||
};
|
||||
|
||||
const initialState = {
|
||||
bannerInfo: {} as BannerInfo,
|
||||
} as BannerInfoState;
|
||||
|
||||
export const createBannerInfoStore = lens<BannerInfoState>((set, get) => ({
|
||||
...initialState,
|
||||
setBannerInfo: (update) => {
|
||||
set((state: BannerInfoState) => {
|
||||
const newBannerInfo = typeof update === 'function' ? update(state.bannerInfo) : update;
|
||||
return {
|
||||
...state,
|
||||
bannerInfo: { ...state.bannerInfo, ...newBannerInfo },
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
}));
|
||||
@@ -190,4 +190,7 @@ export interface EmptyTokenAddSendCodeResponse {
|
||||
|
||||
export interface SectionArrowProps {
|
||||
isOpen?: boolean;
|
||||
};
|
||||
};
|
||||
export interface BannerInfo {
|
||||
HomneBottomBanner: boolean;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user