feat(content): await loadArticles before mount
This commit is contained in:
parent
768ba0ec7e
commit
c1421c5e09
1 changed files with 8 additions and 5 deletions
|
|
@ -2,9 +2,12 @@ import {StrictMode} from 'react';
|
||||||
import {createRoot} from 'react-dom/client';
|
import {createRoot} from 'react-dom/client';
|
||||||
import App from './App.tsx';
|
import App from './App.tsx';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
import { loadArticles } from './data/articles';
|
||||||
|
|
||||||
|
loadArticles().finally(() => {
|
||||||
createRoot(document.getElementById('root')!).render(
|
createRoot(document.getElementById('root')!).render(
|
||||||
<StrictMode>
|
<StrictMode>
|
||||||
<App />
|
<App />
|
||||||
</StrictMode>,
|
</StrictMode>,
|
||||||
);
|
);
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue