Skip to content

Commit

Permalink
feat: some refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mythter committed Sep 23, 2024
1 parent a7e1523 commit 8871463
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/features/MainPage/StaticBanners/StaticBanner.component.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import './StaticBanner.styles.scss';

import useWindowSize from '@/app/common/hooks/stateful/useWindowSize.hook';

import Ornament from '@/assets/images/main-page/ornament.svg';


interface Props {
id: 'catalog' | 'support';
blockName: string,
Expand All @@ -17,12 +15,10 @@ const StaticBanner = ({
id, blockName, blockContent, buttonName, setActionOnClick,
}: Props) => (
<div>
{useWindowSize().width <= 480 && id === 'support' ? <div className="top" /> : <></>}

{useWindowSize().width <= 480 && id === 'support' ? <div className="top" /> : <> </>}

<div className={`mainPageBlockStaticBanner ${id}`}>
{useWindowSize().width > 768 ? <Ornament className="left" /> : <></>}

{useWindowSize().width > 768 ? <Ornament className="left" /> : <> </>}
<div className="mainContainer">
<div className="textContainer">
<p className="title">{blockName}</p>
Expand All @@ -32,9 +28,9 @@ const StaticBanner = ({
<p>{buttonName}</p>
</div>
</div>
{useWindowSize().width > 768 ? <Ornament className="right" /> : <></>}
{useWindowSize().width > 768 ? <Ornament className="right" /> : <> </>}
</div>
{useWindowSize().width <= 480 && id === 'support' ? <div className="bottom" /> : <></>}
{useWindowSize().width <= 480 && id === 'support' ? <div className="bottom" /> : <> </>}
</div>

);
Expand Down

0 comments on commit 8871463

Please sign in to comment.