move protocol provider under theme provider

This commit is contained in:
Pavel Prichodko 2022-06-10 16:06:05 +02:00 committed by Felicio Mununga
parent df0babc6bc
commit a1798ccefd
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
1 changed files with 5 additions and 7 deletions

View File

@ -2,13 +2,12 @@ import React from 'react'
import { BrowserRouter, Route, Routes } from 'react-router-dom'
import { ClientProvider } from '~/src/protocol'
import { MainSidebar } from '~/src/components/main-sidebar'
import { AppProvider } from '~/src/contexts/app-context'
import { DialogProvider } from '~/src/contexts/dialog-context'
import { ThemeProvider } from '~/src/contexts/theme-context'
import { ProtocolProvider } from '~/src/protocol'
import { Chat } from '~/src/routes/chat'
// import { NewChat } from '~/src/routes/new-chat'
import { styled } from '~/src/styles/config'
import { GlobalStyle } from '~/src/styles/GlobalStyle'
@ -24,20 +23,19 @@ export const Community = (props: Props) => {
return (
<Router>
<AppProvider config={props}>
<ClientProvider options={{ publicKey: props.publicKey }}>
<ThemeProvider theme={theme}>
<ThemeProvider theme={theme}>
<ProtocolProvider options={{ publicKey: props.publicKey }}>
<DialogProvider>
<GlobalStyle />
<Wrapper>
<MainSidebar />
<Routes>
<Route path="/:id" element={<Chat />} />
{/* <Route path="/new" element={<NewChat />} /> */}
</Routes>
</Wrapper>
</DialogProvider>
</ThemeProvider>
</ClientProvider>
</ProtocolProvider>
</ThemeProvider>
</AppProvider>
</Router>
)