Skip to content

Commit

Permalink
router.reload
Browse files Browse the repository at this point in the history
  • Loading branch information
TyHil committed Apr 27, 2024
1 parent 820d0f3 commit af915b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/resources/meetings.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Header from '@/components/Header';
import Footer from '@/components/Footer';
import Head from 'next/head';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { ics } from 'calendar-link';

Expand Down Expand Up @@ -87,6 +88,8 @@ const Meeting = (props: MeetingReactProps) => {
};

const Meetings = () => {
const router = useRouter();

const [events, setEvents] = useState<EventFetchProps[]>([]);
const [state, setState] = useState('loading');

Expand Down Expand Up @@ -193,7 +196,7 @@ const Meetings = () => {
let result = (
<div className="px-8 lg:px-16 xl:px-32 flex flex-col items-center">
<h2 className="text-5xl font-bold pb-4 text-center">Error loading calendar</h2>
<button className={buttonLinkClasses} onClick={() => location.reload()}>
<button className={buttonLinkClasses} onClick={() => router.reload()}>
Reload
</button>
</div>
Expand Down

0 comments on commit af915b9

Please sign in to comment.