Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Icon fixed #55

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/sections/EventCard/EventCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const EventCard = ({ data }) => {
layout="fill"
objectFit="cover"
priority="true"
objectPosition="center"
/>
</div>
<div className={styles.overlay}>{data?.name}</div>
Expand Down
22 changes: 15 additions & 7 deletions components/sections/Module/Module.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const Module = ({ data, setSelectedItem, ind }) => {
threshold: 1,
})

console.log(data);
useEffect(() => {
if (inView) setSelectedItem(ind)
}, [inView, ind, setSelectedItem])
Expand All @@ -49,10 +50,11 @@ const Module = ({ data, setSelectedItem, ind }) => {
<div className={styles.image_cnt}>
<div className={styles.image}>
<Image
src="https://placehold.jp/150x150.png"
src={data?.iconImage}
layout="fill"
objectFit="contain"
priority="true"
objectPosition="center"
/>
</div>
</div>
Expand All @@ -70,16 +72,22 @@ const Module = ({ data, setSelectedItem, ind }) => {
toggle(-1)
}}
>
<Image src={left} layout="fill" objectFit="contain" priority="true" />
<Image
src={left}
layout="fill"
objectFit="contain"
priority="true"
objectPosition="center"
/>
</ButtonBack>
<Slider className={styles.carousel} classNameTray={styles.carouselTray}>
{data?.events?.map((event, index) => {
return (
<Link href={`/events/${event?.id}`} key={index}>
<Slide key={index} index={index} style={{ padding: 0 }}>
<EventCard data={event} />
</Slide>
</Link>
<Link href={`/events/${event?.id}`} key={index}>
<Slide key={index} index={index} style={{ padding: 0 }}>
<EventCard data={event} />
</Slide>
</Link>
)
})}
</Slider>
Expand Down
4 changes: 2 additions & 2 deletions components/sections/Module/Module.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
width: 3.35rem;
height: 3.8rem;
border-radius: 20px;

position: relative;
-webkit-clip-path: polygon(
50% 0%,
100% 25%,
Expand All @@ -53,7 +53,7 @@
0% 75%,
0% 25%
);
background-color: black;
background-color: white;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/sections/Modules/Modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Modules = ({ setSelectedItem, setActive, active, modules }) => {
<div className={styles.text}>Modules</div>
</div>
<div className={styles.bg}>
<Image src={bg} layout="fill" objectFit="contain" priority="true" />
<Image src={bg} layout="fill" objectFit="contain" priority="true" objectPosition="center"/>
</div>
<div>
{modules.length === 0 && (
Expand Down
75 changes: 28 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.