Skip to content

Commit 1488a96

Browse files
committed
Refactor: Use dynamic year value from EventData.js instead of hardcoded text
1 parent 087837d commit 1488a96

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/views/events/EventData.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// Array of events for the current year's PyCon
2+
export const currentYear = 2025
3+
24
export const events = [
35
{
46
date: '1-2 March',

src/views/events/Events.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState } from "react";
2-
import {slides, events, upcomingEvents} from './EventData';
2+
import {slides, currentYear, events, upcomingEvents} from './EventData';
33
import './style.css';
44

55
export default function Events() {
@@ -29,7 +29,7 @@ export default function Events() {
2929
<div className="section-heading">
3030
<h1 className="text-white">Events</h1>
3131
<br />
32-
<h4 className="text-white">Regional PyCon 2024 in APAC Schedule</h4>
32+
<h4 className="text-white">Regional PyCon {currentYear} in APAC Schedule</h4>
3333
<br />
3434
</div>
3535
<div className="medium-text text-white" style={{opacity: '60%'}}>
@@ -48,7 +48,7 @@ export default function Events() {
4848
<div className="left-text-content">
4949
<div className="section-heading">
5050
<br />
51-
<h4 className="text-white">Regional PyCon 2025 in APAC Schedule</h4>
51+
<h4 className="text-white">Regional PyCon {currentYear+1} in APAC Schedule</h4>
5252
<br />
5353
</div>
5454
<div className="medium-text text-white" style={{opacity: '60%'}}>

0 commit comments

Comments
 (0)