frontend: trigger sync when entering the page

This commit is contained in:
ycdesu 2022-06-14 17:19:52 +08:00
parent b8ce53290d
commit 9c525e5d18

View File

@ -7,6 +7,7 @@ import { ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import theme from '../src/theme';
import '../styles/globals.css';
import {triggerSync} from "../api/bbgo";
export default function MyApp(props) {
const { Component, pageProps } = props;
@ -19,6 +20,10 @@ export default function MyApp(props) {
}
}, []);
useEffect(() => {
triggerSync()
}, [])
return (
<React.Fragment>
<Head>