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