mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed flow timers
This commit is contained in:
parent
81cd45f168
commit
fa0d3c9932
3 changed files with 5 additions and 14 deletions
|
@ -4,15 +4,6 @@ import * as styles from './styles.scss';
|
||||||
|
|
||||||
type IProps = React.HTMLAttributes<HTMLDivElement>;
|
type IProps = React.HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const Filler: FC<IProps> = ({
|
export const Filler: FC<IProps> = ({ className = '', ...props }) => (
|
||||||
className = '',
|
<div className={classNames(styles.filler, className)} {...props} />
|
||||||
...props
|
|
||||||
}) => (
|
|
||||||
<div
|
|
||||||
className={classNames(
|
|
||||||
styles.filler,
|
|
||||||
className,
|
|
||||||
)}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -46,7 +46,7 @@ const FlowHeroUnconnected: FC<IProps> = ({ heroes, history }) => {
|
||||||
}, [loaded, current, setCurrent, timer]);
|
}, [loaded, current, setCurrent, timer]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
timer.current = setTimeout(onNext, 3000);
|
timer.current = setTimeout(onNext, 5000);
|
||||||
|
|
||||||
return () => clearTimeout(timer.current);
|
return () => clearTimeout(timer.current);
|
||||||
}, [current]);
|
}, [current]);
|
||||||
|
@ -61,7 +61,7 @@ const FlowHeroUnconnected: FC<IProps> = ({ heroes, history }) => {
|
||||||
|
|
||||||
const stopSliding = useCallback(() => {
|
const stopSliding = useCallback(() => {
|
||||||
clearTimeout(timer.current);
|
clearTimeout(timer.current);
|
||||||
timer.current = setTimeout(onNext, 3000);
|
timer.current = setTimeout(onNext, 5000);
|
||||||
}, [timer, onNext]);
|
}, [timer, onNext]);
|
||||||
|
|
||||||
const onClick = useCallback(() => {
|
const onClick = useCallback(() => {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: none;
|
display: none;
|
||||||
transition: opacity 1s;
|
transition: opacity 2s;
|
||||||
background: 50% 50% no-repeat;
|
background: 50% 50% no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
border-radius: $cell_radius;
|
border-radius: $cell_radius;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue