From dbac251c767ddd436904d0650ccead865084eb23 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sat, 4 Sep 2021 12:15:30 +0800 Subject: [PATCH] refactor: use fetch api instead of axios --- src/index.js | 2 +- view/index.html | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 92a60ec..4580db8 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ import App from '../src/app.js'; -window.json = async fileName=>(await axios(`../data/${fileName}.json`)).data; +window.json = async fileName => await (await fetch(`../data/${fileName}.json`)).json(); // Pssst, I've created a github package - https://github.com/brookesb91/dismissible const hideBanners = (e) => { diff --git a/view/index.html b/view/index.html index fd6b3c8..53e294e 100644 --- a/view/index.html +++ b/view/index.html @@ -8,7 +8,6 @@ - Life Restart