Skip to content

Commit 7d895bc

Browse files
committed
chore: memo hook complaints
1 parent cdb8087 commit 7d895bc

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/views/Home/components/SpeakersCarousel/SpeakerSwiper.tsx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,29 @@ const StyledSlideText = styled.p`
3737
const SpeakerSwiper: FC<React.PropsWithChildren<unknown>> = () => {
3838
const {isLoading, data, error} = useFetchSpeakers();
3939

40-
const victorRentea: ISpeaker = {
41-
id: "8f5f4c31-232b-4e04-b736-6b2775c939cf",
42-
fullName: "Victor Rentea",
43-
bio: "With two decades of experience, Victor is a Java Champion working as a trainer for top companies in Europe. More than five thousand developers of 120 companies attended his workshops, so every week he has the opportunity to debate with bright engineers the challenges faced by their projects. In return, Victor summarizes key learning points from these workshops in conference talks and online meetups for the European Software Crafters, the world’s largest community around architecture, refactoring, and testing. Find out how Victor can help you on https://victorrentea.ro: training catalog, consultancy, and YouTube playlists of his talks.",
44-
speakerImage: "https://sessionize.com/image/3031-0o0o0-a3r6JkTgm9aUHJXBhbvnWQ.jpg?download=victor-rentea.jpg",
45-
linkedInUrl: {
46-
url: "https://x.com/victorrentea",
47-
linkType: "LinkedIn",
48-
title: "LinkedIn"
49-
},
50-
sessions: [],
51-
twitterUrl: {
52-
url: "https://www.linkedin.com/in/victor-rentea-trainer",
53-
linkType: "Twitter",
54-
title: "Twitter"
55-
},
56-
tagLine: "Java Champion and Trainer",
57-
};
5840

5941
const cachedSpeakers = React.useMemo(() => {
42+
const victorRentea: ISpeaker = {
43+
id: "8f5f4c31-232b-4e04-b736-6b2775c939cf",
44+
fullName: "Victor Rentea",
45+
bio: "With two decades of experience, Victor is a Java Champion working as a trainer for top companies in Europe. More than five thousand developers of 120 companies attended his workshops, so every week he has the opportunity to debate with bright engineers the challenges faced by their projects. In return, Victor summarizes key learning points from these workshops in conference talks and online meetups for the European Software Crafters, the world’s largest community around architecture, refactoring, and testing. Find out how Victor can help you on https://victorrentea.ro: training catalog, consultancy, and YouTube playlists of his talks.",
46+
speakerImage: "https://sessionize.com/image/3031-0o0o0-a3r6JkTgm9aUHJXBhbvnWQ.jpg?download=victor-rentea.jpg",
47+
linkedInUrl: {
48+
url: "https://x.com/victorrentea",
49+
linkType: "LinkedIn",
50+
title: "LinkedIn"
51+
},
52+
sessions: [],
53+
twitterUrl: {
54+
url: "https://www.linkedin.com/in/victor-rentea-trainer",
55+
linkType: "Twitter",
56+
title: "Twitter"
57+
},
58+
tagLine: "Java Champion and Trainer",
59+
};
6060
const allSpeakers = data ? [...data, victorRentea] : [victorRentea];
6161
return allSpeakers.sort(() => 0.5 - Math.random()).slice(0, 20);
62-
}, [data, victorRentea]);
62+
}, [data]);
6363

6464
if (error) {
6565
Sentry.captureException(error);
@@ -109,13 +109,13 @@ const SpeakerSwiper: FC<React.PropsWithChildren<unknown>> = () => {
109109
to={`${ROUTE_SPEAKER_DETAIL}/${speaker.id}`}
110110
style={{textDecoration: "none"}}
111111
>*/}
112-
<StyledSlideImage
113-
src={speaker.speakerImage}
114-
alt={speaker.fullName}
115-
/>
116-
<StyledSlideContain>
117-
<StyledSlideText>{speaker.fullName}</StyledSlideText>
118-
</StyledSlideContain>
112+
<StyledSlideImage
113+
src={speaker.speakerImage}
114+
alt={speaker.fullName}
115+
/>
116+
<StyledSlideContain>
117+
<StyledSlideText>{speaker.fullName}</StyledSlideText>
118+
</StyledSlideContain>
119119
{/*</Link>*/}
120120
</SwiperSlide>
121121
))}

0 commit comments

Comments
 (0)