Skip to content

Commit bac67cf

Browse files
committed
chore: update seasonal event sharing
1 parent a1b6f05 commit bac67cf

5 files changed

Lines changed: 178 additions & 150 deletions

File tree

src/components/ui/SeasonalBanner.tsx

Lines changed: 74 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,24 @@ import Carousel from './Carousel';
3434
*/
3535
const SeasonalBanner: React.FC = () => {
3636
const theme = useTheme();
37-
const { getContent } = useLocalizedContent('screens', 'landingSeasonal');
37+
const { getContent, hasTranslation } = useLocalizedContent(
38+
'screens',
39+
'landingSeasonal'
40+
);
3841
const [isVisible, setIsVisible] = useState(true);
3942
const eventSponsors = useEventSponsors();
4043

4144
const overline = getContent<string>('overline');
4245
const title = getContent<string>('title');
4346
const primaryButtonText = getContent<string>('primaryButtonText');
44-
const location = getContent<string>('location');
45-
const date = getContent<string>('date');
47+
const location = hasTranslation('location')
48+
? getContent<string>('location')
49+
: '';
50+
const date = hasTranslation('date') ? getContent<string>('date') : '';
4651
const subscriptionEndAlert = getContent<string>('subscriptionEndAlert');
47-
const sponsorsTitle = getContent<string>('sponsors.title');
52+
const sponsorsTitle = hasTranslation('sponsors.title')
53+
? getContent<string>('sponsors.title')
54+
: '';
4855

4956
const handlePrimaryButton = () => {
5057
const url = `${import.meta.env.VITE_LANDING_CAMPAIGN_BASE_URL}`;
@@ -210,63 +217,69 @@ const SeasonalBanner: React.FC = () => {
210217
{title}
211218
</Typography>
212219

213-
<Stack
214-
direction={{ xs: 'column', sm: 'row' }}
215-
spacing={2}
216-
alignItems={{ xs: 'center', md: 'flex-start' }}
217-
sx={{ mb: 0 }}
218-
>
219-
<Box sx={{ display: 'flex', alignItems: 'center' }}>
220-
<CalendarTodayIcon
221-
sx={{
222-
color:
223-
theme.palette.mode === 'dark'
224-
? theme.palette.text.secondary
225-
: theme.palette.primary.contrastText,
226-
mr: 1,
227-
fontSize: '1.1rem',
228-
}}
229-
/>
230-
<Typography
231-
variant="body1"
232-
component="span"
233-
sx={{
234-
color:
235-
theme.palette.mode === 'dark'
236-
? theme.palette.text.secondary
237-
: theme.palette.primary.contrastText,
238-
fontWeight: 500,
239-
}}
240-
>
241-
{date}
242-
</Typography>
243-
</Box>
244-
<Box sx={{ display: 'flex', alignItems: 'center' }}>
245-
<LocationOnIcon
246-
sx={{
247-
color:
248-
theme.palette.mode === 'dark'
249-
? theme.palette.text.secondary
250-
: theme.palette.primary.contrastText,
251-
mr: 1,
252-
fontSize: '1.1rem',
253-
}}
254-
/>
255-
<Typography
256-
variant="body1"
257-
component="span"
258-
sx={{
259-
color:
260-
theme.palette.mode === 'dark'
261-
? theme.palette.text.secondary
262-
: theme.palette.primary.contrastText,
263-
fontWeight: 500,
264-
}}
265-
>
266-
{location}
267-
</Typography>
268-
</Box>
269-
</Stack>
220+
{(date || location) && (
221+
<Stack
222+
direction={{ xs: 'column', sm: 'row' }}
223+
spacing={2}
224+
alignItems={{ xs: 'center', md: 'flex-start' }}
225+
sx={{ mb: 0 }}
226+
>
227+
{date && (
228+
<Box sx={{ display: 'flex', alignItems: 'center' }}>
229+
<CalendarTodayIcon
230+
sx={{
231+
color:
232+
theme.palette.mode === 'dark'
233+
? theme.palette.text.secondary
234+
: theme.palette.primary.contrastText,
235+
mr: 1,
236+
fontSize: '1.1rem',
237+
}}
238+
/>
239+
<Typography
240+
variant="body1"
241+
component="span"
242+
sx={{
243+
color:
244+
theme.palette.mode === 'dark'
245+
? theme.palette.text.secondary
246+
: theme.palette.primary.contrastText,
247+
fontWeight: 500,
248+
}}
249+
>
250+
{date}
251+
</Typography>
252+
</Box>
253+
)}
254+
{location && (
255+
<Box sx={{ display: 'flex', alignItems: 'center' }}>
256+
<LocationOnIcon
257+
sx={{
258+
color:
259+
theme.palette.mode === 'dark'
260+
? theme.palette.text.secondary
261+
: theme.palette.primary.contrastText,
262+
mr: 1,
263+
fontSize: '1.1rem',
264+
}}
265+
/>
266+
<Typography
267+
variant="body1"
268+
component="span"
269+
sx={{
270+
color:
271+
theme.palette.mode === 'dark'
272+
? theme.palette.text.secondary
273+
: theme.palette.primary.contrastText,
274+
fontWeight: 500,
275+
}}
276+
>
277+
{location}
278+
</Typography>
279+
</Box>
280+
)}
281+
</Stack>
282+
)}
270283
</Box>
271284

272285
<Box
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"overline": "REGISTRATION: 05/24 - 06/06",
3-
"title": "RAIA Conference 2025",
4-
"subtitle": "A gathering to discuss the present and future of Artificial Intelligence in Brazil. Talks with experts, innovative project presentations, networking, and technical debates.",
2+
"overline": "REGISTRATION: 01/19 - 01/26",
3+
"title": "RAIA Fellowship 2026",
4+
"subtitle": "RAIA's Talent Development Program where members enhance their AI knowledge through projects, mentoring, and connections.",
55
"buttonText": "Enter Site",
6-
"primaryButtonText": "Watch Live",
7-
"location": "ICMC USP São Carlos - Fernão Stella Auditorium",
8-
"date": "06/14/2025",
9-
"subscriptionEndDate": "06/06",
10-
"subscriptionEndAlert": "Registration has ended, but don't worry! You can watch the event live remotely.",
6+
"primaryButtonText": "Apply",
7+
"location": "",
8+
"date": "",
9+
"subscriptionEndDate": "01/26",
10+
"subscriptionEndAlert": "Applications are closed.",
1111
"features": [
12-
"Talks with top AI experts",
13-
"Presentations of innovative projects",
14-
"Networking",
15-
"Strategic and technical debates"
12+
"Work on high-impact projects",
13+
"Participate in mentoring with experts",
14+
"Develop leadership and other soft skills",
15+
"Gain valuable connections with AI talents"
1616
],
17-
"cta": "If you want to be among those shaping the future of AI in the country, this event is for you. Registration open from 05/24 to 06/13/2025. Be part of this transformation!",
17+
"cta": "If you want to learn more about AI, get hands-on experience in a real impact project, and make valuable connections, the Fellowship is for you! Apply now!",
1818
"sponsors": {
19-
"title": "Official Sponsors",
20-
"subtitle": "Leading companies that support technological innovation in Brazil"
19+
"title": "",
20+
"subtitle": ""
2121
}
2222
}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"overline": "INSCRIPCIONES: 24/05 - 06/06",
3-
"title": "RAIA Conference 2025",
4-
"subtitle": "Un encuentro para discutir el presente y futuro de la Inteligencia Artificial en Brasil. Charlas con expertos, presentaciones de proyectos innovadores, networking y debates técnicos.",
2+
"overline": "INSCRIPCIONES: 19/01 - 26/01",
3+
"title": "RAIA Fellowship 2026",
4+
"subtitle": "Programa de Desarrollo de Talentos de RAIA donde los miembros mejoran sus conocimientos en IA a través de proyectos, mentorías y conexiones.",
55
"buttonText": "Entrar al Sitio",
6-
"primaryButtonText": "Ver en Vivo",
7-
"location": "ICMC USP São Carlos - Auditorio Fernão Stella",
8-
"date": "14/06",
9-
"subscriptionEndDate": "06/06",
10-
"subscriptionEndAlert": "Las inscripciones han terminado, pero no te preocupes. Puedes ver el evento en vivo de forma remota.",
6+
"primaryButtonText": "Inscribirse",
7+
"location": "",
8+
"date": "",
9+
"subscriptionEndDate": "26/01",
10+
"subscriptionEndAlert": "Las inscripciones han finalizado.",
1111
"features": [
12-
"Charlas con expertos en IA",
13-
"Presentaciones de proyectos innovadores",
14-
"Networking",
15-
"Debates estratégicos y técnicos"
12+
"Realizar proyectos de alto impacto",
13+
"Participar en mentorías con expertos",
14+
"Desarrollar habilidades de liderazgo y otras soft skills",
15+
"Obtener conexiones valiosas con talentos en IA"
1616
],
17-
"cta": "Si quieres estar entre aquellos que moldean el futuro de la IA en el país, este evento es para ti. Inscripciones abiertas del 24/05 al 13/06. ¡Sé parte de esta transformación!",
17+
"cta": "Si buscas aprender más sobre IA, poner manos a la obra en un proyecto de impacto real y conseguir conexiones valiosas, ¡el Fellowship es para ti! ¡Inscríbete!",
1818
"sponsors": {
19-
"title": "Patrocinadores Oficiales",
20-
"subtitle": "Empresas líderes que apoyan la innovación tecnológica en Brasil"
19+
"title": "",
20+
"subtitle": ""
2121
}
2222
}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"overline": "INSCRIÇÕES: 24/05 - 06/06",
3-
"title": "RAIA Conference 2025",
4-
"subtitle": "Um encontro para discutir o presente e futuro da Inteligência Artificial no Brasil. Palestras com especialistas, apresentações de projetos inovadores, networking e debates técnicos.",
2+
"overline": "INSCRIÇÕES: 19/01 - 26/01",
3+
"title": "RAIA Fellowship 2026",
4+
"subtitle": "Programa de Desenvolvimento de Talentos do RAIA em que os membros aprimoram seus conhecimentos em IA por meio de projetos, mentorias e conexões.",
55
"buttonText": "Entrar no Site",
6-
"primaryButtonText": "Assistir ao Vivo",
7-
"location": "ICMC USP São Carlos - Auditório Fernão Stella",
8-
"date": "14/06",
9-
"subscriptionEndDate": "06/06",
10-
"subscriptionEndAlert": "Inscrições encerraram, mas não se preocupe! Você pode assistir ao evento ao vivo remotamente.",
6+
"primaryButtonText": "Inscrever-se",
7+
"location": "",
8+
"date": "",
9+
"subscriptionEndDate": "26/01",
10+
"subscriptionEndAlert": "As inscrições foram encerradas.",
1111
"features": [
12-
"Palestras com especialistas em IA",
13-
"Apresentações de projetos inovadores",
14-
"Networking",
15-
"Debates estratégicos e técnicos"
12+
"Fazer projetos de alto impacto",
13+
"Participar de Mentorias com especialistas",
14+
"Aprimorar habilidades de liderança e outras softskills",
15+
"Obter conexões valiosas com talentos em IA"
1616
],
17-
"cta": "Se você quer estar entre aqueles que moldam o futuro da IA no país, este evento é para você. Inscrições abertas de 24/05 a 13/06. Seja parte desta transformação!",
17+
"cta": "Se você busca aprender mais sobre IA, colocar a mão na massa em um projeto de impacto real e conseguir conexões valiosas, o Fellowship é para você! Inscreva-se!",
1818
"sponsors": {
19-
"title": "Patrocinadores Oficiais",
20-
"subtitle": "Empresas líderes que apoiam a inovação tecnológica no Brasil"
19+
"title": "",
20+
"subtitle": ""
2121
}
2222
}

src/pages/LandingSeasonal.tsx

Lines changed: 59 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ const LandingSeasonal: React.FC = () => {
3535
const theme = useTheme();
3636
const navigate = useNavigate();
3737
const buttonRef = useRef<HTMLButtonElement>(null);
38-
const { getContent } = useLocalizedContent('screens', 'landingSeasonal');
38+
const { getContent, hasTranslation } = useLocalizedContent(
39+
'screens',
40+
'landingSeasonal'
41+
);
3942

4043
const backgroundVariations = getThemeBackgroundVariations(theme);
4144
const { background, overlay } = backgroundVariations.soft;
@@ -45,13 +48,19 @@ const LandingSeasonal: React.FC = () => {
4548
const subtitle = getContent<string>('subtitle');
4649
const buttonText = getContent<string>('buttonText');
4750
const primaryButtonText = getContent<string>('primaryButtonText');
48-
const location = getContent<string>('location');
49-
const date = getContent<string>('date');
51+
const location = hasTranslation('location')
52+
? getContent<string>('location')
53+
: '';
54+
const date = hasTranslation('date') ? getContent<string>('date') : '';
5055
const subscriptionEndAlert = getContent<string>('subscriptionEndAlert');
5156
const features = getContent<string[]>('features') || [];
5257
const cta = getContent<string>('cta');
53-
const sponsorsTitle = getContent<string>('sponsors.title');
54-
const sponsorsSubtitle = getContent<string>('sponsors.subtitle');
58+
const sponsorsTitle = hasTranslation('sponsors.title')
59+
? getContent<string>('sponsors.title')
60+
: '';
61+
const sponsorsSubtitle = hasTranslation('sponsors.subtitle')
62+
? getContent<string>('sponsors.subtitle')
63+
: '';
5564

5665
useEffect(() => {
5766
if (buttonRef.current) {
@@ -134,45 +143,51 @@ const LandingSeasonal: React.FC = () => {
134143
{title}
135144
</Typography>
136145

137-
<Stack
138-
direction="row"
139-
spacing={2}
140-
justifyContent="center"
141-
sx={{ mb: spacing.xs }}
142-
>
143-
<Box sx={{ display: 'flex', alignItems: 'center' }}>
144-
<CalendarTodayIcon
145-
sx={{
146-
color: theme.palette.common.white,
147-
mr: 1,
148-
fontSize: '1.2rem',
149-
}}
150-
/>
151-
<Typography
152-
variant="body1"
153-
component="span"
154-
sx={{ color: theme.palette.common.white, fontSize: '1rem' }}
155-
>
156-
{date}
157-
</Typography>
158-
</Box>
159-
<Box sx={{ display: 'flex', alignItems: 'center' }}>
160-
<LocationOnIcon
161-
sx={{
162-
color: theme.palette.common.white,
163-
mr: 1,
164-
fontSize: '1.2rem',
165-
}}
166-
/>
167-
<Typography
168-
variant="body1"
169-
component="span"
170-
sx={{ color: theme.palette.common.white, fontSize: '1rem' }}
171-
>
172-
{location}
173-
</Typography>
174-
</Box>
175-
</Stack>
146+
{(date || location) && (
147+
<Stack
148+
direction="row"
149+
spacing={2}
150+
justifyContent="center"
151+
sx={{ mb: spacing.xs }}
152+
>
153+
{date && (
154+
<Box sx={{ display: 'flex', alignItems: 'center' }}>
155+
<CalendarTodayIcon
156+
sx={{
157+
color: theme.palette.common.white,
158+
mr: 1,
159+
fontSize: '1.2rem',
160+
}}
161+
/>
162+
<Typography
163+
variant="body1"
164+
component="span"
165+
sx={{ color: theme.palette.common.white, fontSize: '1rem' }}
166+
>
167+
{date}
168+
</Typography>
169+
</Box>
170+
)}
171+
{location && (
172+
<Box sx={{ display: 'flex', alignItems: 'center' }}>
173+
<LocationOnIcon
174+
sx={{
175+
color: theme.palette.common.white,
176+
mr: 1,
177+
fontSize: '1.2rem',
178+
}}
179+
/>
180+
<Typography
181+
variant="body1"
182+
component="span"
183+
sx={{ color: theme.palette.common.white, fontSize: '1rem' }}
184+
>
185+
{location}
186+
</Typography>
187+
</Box>
188+
)}
189+
</Stack>
190+
)}
176191

177192
<Typography
178193
variant="body1"

0 commit comments

Comments
 (0)