Skip to content

Commit 194a486

Browse files
committed
disable caching on the admin portal pull for getting events
1 parent 2462f45 commit 194a486

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ui/pages/events/ViewEvents.page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ export const ViewEventsPage: React.FC = () => {
9797

9898
useEffect(() => {
9999
const getEvents = async () => {
100-
const response = await api.get('/api/v1/events');
101-
const upcomingEvents = await api.get('/api/v1/events?upcomingOnly=true');
100+
const response = await api.get('/api/v1/events', {
101+
headers: { 'Cache-Control': 'no-cache', Pragma: 'no-cache', Expires: 0 },
102+
});
103+
const upcomingEvents = await api.get('/api/v1/events?upcomingOnly=true', {
104+
headers: { 'Cache-Control': 'no-cache', Pragma: 'no-cache', Expires: 0 },
105+
});
102106
const upcomingEventsSet = new Set(upcomingEvents.data.map((x: EventGetResponse) => x.id));
103107
const events = response.data;
104108
events.sort((a: EventGetResponse, b: EventGetResponse) => {

0 commit comments

Comments
 (0)