This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.matchMedia( "(min-width: 1366px)" ).matches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (process.browser && window.innerWidth >= 1366) { | |
_slidesToShow = 3; | |
} else if (process.browser && window.innerWidth >= 1024) { | |
_slidesToShow = 2; | |
} else if (process.browser && window.innerWidth >= 320) { | |
_slidesToShow = 1; | |
} | |
events.length !== 0 && <div | |
className={events.length <= _slidesToShow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const fetchApi = async (url, init = {}) => { | |
const result = await fetch(`${baseUrl}${url}`,{...init}); | |
if (!result.ok) { | |
throw new Error(`Ошибка при запросе ${url}, код ${result.status}`); | |
} | |
return await result.json(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="tab-wrapper"> | |
<div class="tabs-header"> | |
<div class="tab-header tab-header_show">Header 1</div> | |
<!-- /.tab-header --> | |
<div class="tab-header">Header 2</div> | |
<!-- /.tab-header --> | |
<div class="tab-header">Header 3</div> | |
<!-- /.tab-header --> | |
</div> | |
<!-- /.tabs-header --> |