1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

fixed mobile appearance of dialogs

This commit is contained in:
Fedor Katurov 2022-07-14 13:26:53 +07:00
parent 4483d7a0f5
commit 042f238590
8 changed files with 25 additions and 19 deletions

View file

@ -34,13 +34,13 @@ const lazy = {
};
export const FlowSwiperHero: FC<Props> = ({ heroes }) => {
const { innerWidth } = useWindowSize();
const { isMobile } = useWindowSize();
const { push } = useNavigation();
const [controlledSwiper, setControlledSwiper] = useState<SwiperClass | undefined>(undefined);
const [currentIndex, setCurrentIndex] = useState(heroes.length);
const preset = useMemo(() => (innerWidth <= 768 ? ImagePresets.cover : ImagePresets.small_hero), [
innerWidth,
const preset = useMemo(() => (isMobile ? ImagePresets.cover : ImagePresets.small_hero), [
isMobile,
]);
const onNext = useCallback(() => {