Sentre
Search…
View
The DApp's appearance
The view is strictly required. In this view, your DApp will occupy the whole viewpoint of the device; except the header of the system. You have a full right to customize it by owned style.
The page view
To implement the view, the code will be placed in ./src/app/view and declared by the file ./src/app/bootstrap.app.tsx .
1
// ./src/app/bootstrap.app.tsx
2
​
3
import { Provider } from 'react-redux'
4
import { WalletProvider, UIProvider } from '@senhub/providers'
5
​
6
import View from 'app/view'
7
​
8
import model from 'app/model'
9
import configs from 'app/configs'
10
​
11
const {
12
manifest: { appId },
13
} = configs
14
​
15
export const Page = () => {
16
return (
17
<UIProvider appId={appId}>
18
<WalletProvider>
19
<Provider store={model}>
20
<View />
21
</Provider>
22
</WalletProvider>
23
</UIProvider>
24
)
25
}
Copied!
In the template, you can see that the View organized in the page folder is re-exported with context providers (see Providers) in the page file.
The structure in the bootstrap file is compulsory for DApp recognition. However, the page folder has no restrictions.
​
Copy link