|
|
|
|
@ -115,10 +115,12 @@ export default function Events() {
|
|
|
|
|
const [events, setEvents] = useState(null) |
|
|
|
|
|
|
|
|
|
useEffect(async () => { |
|
|
|
|
const res = await fetch(endpoint, fetch_options) |
|
|
|
|
const result = await res.json() |
|
|
|
|
setEvents(result) |
|
|
|
|
}, []) |
|
|
|
|
if (events === null) { |
|
|
|
|
const res = await fetch(endpoint, fetch_options) |
|
|
|
|
const result = await res.json() |
|
|
|
|
setEvents(events) |
|
|
|
|
} |
|
|
|
|
}, [events]) |
|
|
|
|
|
|
|
|
|
if (events === null) { |
|
|
|
|
return <p>Laster arrangement...</p> |
|
|
|
|
|