34 lines
662 B
JavaScript
34 lines
662 B
JavaScript
// 404.js
|
|
|
|
import Image from "next/image";
|
|
import { useRouter } from "next/router";
|
|
import axios from "axios";
|
|
|
|
const FourOhFour = (props) => {
|
|
const router = useRouter();
|
|
|
|
let numbWeeks = router.query.weekstoday;
|
|
return (
|
|
<div>
|
|
<Image
|
|
src={"/api/multidays/" + numbWeeks}
|
|
width="940"
|
|
height="788"
|
|
alt="days"
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export async function getServerSideProps(context) {
|
|
for (let i = 1; i < 365; i++) {
|
|
let response = await fetch("http://localhost:3000/api/multidays/" + i);
|
|
}
|
|
|
|
return {
|
|
props: {}, // will be passed to the page component as props
|
|
};
|
|
}
|
|
|
|
export default FourOhFour;
|