parse events

This commit is contained in:
Daniel Waxweiler 2024-04-02 23:30:56 +02:00
parent 48fa50ab85
commit 2889edcb4c
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ export default ({ attributes, setAttributes }) => {
}
fetch(url)
.then((response) => response.text()) // TODO also handle response.ok being false
.then((events) => {
.then((data) => {
const events = JSON.parse(data)
displayEvents({ events, document, container })
})
.catch((data) => {