save assets to filesystem
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// 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/multiweeks/" + numbWeeks}
|
||||
width="940"
|
||||
height="788"
|
||||
alt="days"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export async function getServerSideProps(context) {
|
||||
for (let i = 1; i < 53; i++) {
|
||||
let response = await fetch("http://localhost:3000/api/multiweeks/" + i);
|
||||
}
|
||||
|
||||
return {
|
||||
props: {}, // will be passed to the page component as props
|
||||
};
|
||||
}
|
||||
|
||||
export default FourOhFour;
|
||||
Reference in New Issue
Block a user