feat(socketio): get users online and offline (users status) (2)

This commit is contained in:
Leandro Antônio Farias Machado 2023-06-18 22:26:03 -03:00
parent 526804c291
commit 742fcc9d3c

View File

@ -9,6 +9,7 @@ import { useNProgress } from 'src/hooks/use-nprogress';
import { createTheme } from 'src/theme';
import { createEmotionCache } from 'src/utils/create-emotion-cache';
import 'simplebar-react/dist/simplebar.min.css';
import { WsProvider } from 'src/contexts/socketio-context';
const clientSideEmotionCache = createEmotionCache();
@ -36,16 +37,18 @@ const App = (props) => {
</Head>
<LocalizationProvider dateAdapter={AdapterDateFns}>
<AuthProvider>
<ThemeProvider theme={theme}>
<CssBaseline />
<AuthConsumer>
{
(auth) => auth.isLoading
? <SplashScreen />
: getLayout(<Component {...pageProps} />)
}
</AuthConsumer>
</ThemeProvider>
<WsProvider>
<ThemeProvider theme={theme}>
<CssBaseline />
<AuthConsumer>
{
(auth) => auth.isLoading
? <SplashScreen />
: getLayout(<Component {...pageProps} />)
}
</AuthConsumer>
</ThemeProvider>
</WsProvider>
</AuthProvider>
</LocalizationProvider>
</CacheProvider>