const breakpoint = window.matchMedia( '(min-width:992px)' );
(function() {
'use strict';
let portfolioSwiper;
const breakpointCheckerTwo = function() {
if ( breakpoint.matches === true ) {
if ( portfolioSwiper !== undefined ) {
portfolioSwiper.destroy( true, true )
}
} else if ( breakpoint.matches === false ) {
return enableSwiperTwo();
}
};
const enableSwiperTwo = function() {
document.querySelectorAll('#portfolio_slider').forEach(n => {
portfolioSwiper = new Swiper(n.querySelector('.slider-portfolio'), {
slidesPerView: "1",
spaceBetween: 30,
paginationClickable: true,
pagination: {
el: '.slider-portfolio .swiper-pagination',
clickable: true,
},
});
});
};
breakpoint.addListener(breakpointCheckerTwo);
breakpointCheckerTwo();
})();
$args = array(
'post_type' => 'bh-objects',
'posts_per_page' => 8,
'post__not_in' => array(get_the_ID()),
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'object_tag',
'field' => 'id',
'terms' => $term_id_list,
'include_children' => false,
)
),
);
$query = new WP_Query( $args );
const StepResetInfo = ({ onNext, className }) => {
const [seconds, setSeconds] = React.useState(60);
const [timerActive, setTimerActive] = React.useState(false);
React.useEffect(() => {
if (seconds > 0 && timerActive) {
setTimeout(setSeconds, 100, seconds - 1);
}
}, [seconds, timerActive]);
setTimerActive(!timerActive);
return (
<>
<div className={cx(styles.authWrap__main, className)}>
<div className={styles.authWrap__cont}>
<InfoBox data={data} />
<div>{seconds}</div>
</div>
</div>
<div className={cx(styles.authWrap__bottom, className)}>
<Button disabled={timerActive ? '1' : '0'} onClick={onNext}>Reset password</Button>
</div>
</>
);
};