23 lines
645 B
JavaScript
23 lines
645 B
JavaScript
|
import AppContainer from './AppContainer';
|
||
|
import { useDispatch, useSelector } from 'react-redux'
|
||
|
import React, { useEffect } from 'react';
|
||
|
import { defineLocale, updateURLS } from "../utils";
|
||
|
|
||
|
export default function SplashScreen(props) {
|
||
|
const apiUrl = useSelector(state => state.urls.site);
|
||
|
const dispatch = useDispatch();
|
||
|
const locale = defineLocale(undefined);
|
||
|
|
||
|
useEffect(() => {
|
||
|
updateURLS(locale, dispatch);
|
||
|
});
|
||
|
if (!apiUrl) {
|
||
|
return (
|
||
|
<div style={{fontSize: "48px", fontWeight: "600", margin: "auto"}}>
|
||
|
Loading...
|
||
|
</div>
|
||
|
)
|
||
|
}
|
||
|
return <AppContainer />
|
||
|
}
|