Skip to content

Commit 26c7ec2

Browse files
authored
Update committee.js
1 parent e7ca17a commit 26c7ec2

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

src/pages/committee.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -95,43 +95,43 @@ export default function Committee({ committeeData = {} }) {
9595
// -----------------------------
9696
// Data fetching
9797
// -----------------------------
98-
export async function getStaticProps() {
99-
try {
100-
const res = await fetch(
101-
"https://wrcrobotics.pythonanywhere.com/committee"
102-
);
103-
104-
const committeeData = await res.json();
105-
106-
return {
107-
props: { committeeData },
108-
revalidate: 10,
109-
};
110-
} catch (err) {
111-
return {
112-
props: { committeeData: {} },
113-
revalidate: 10,
114-
};
115-
}
116-
}
117-
// export async function getServerSideProps() {
98+
// export async function getStaticProps() {
11899
// try {
119100
// const res = await fetch(
120-
// "https://wrcrobotics.pythonanywhere.com/committee",
121-
// { cache: "no-store" }
101+
// "https://wrcrobotics.pythonanywhere.com/committee"
122102
// );
123103

124104
// const committeeData = await res.json();
125105

126106
// return {
127107
// props: { committeeData },
108+
// revalidate: 10,
128109
// };
129110
// } catch (err) {
130111
// return {
131112
// props: { committeeData: {} },
113+
// revalidate: 10,
132114
// };
133115
// }
134116
// }
117+
export async function getServerSideProps() {
118+
try {
119+
const res = await fetch(
120+
"https://wrcrobotics.pythonanywhere.com/committee",
121+
{ cache: "no-store" }
122+
);
123+
124+
const committeeData = await res.json();
125+
126+
return {
127+
props: { committeeData },
128+
};
129+
} catch (err) {
130+
return {
131+
props: { committeeData: {} },
132+
};
133+
}
134+
}
135135

136136
// -----------------------------
137137
// Styles (cleaned)

0 commit comments

Comments
 (0)