-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathApp.jsx
72 lines (59 loc) · 1.63 KB
/
App.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import "./App.css";
import React from "react";
import {Switch, BrowserRouter as Router, Route, useHistory} from "react-router-dom";
import MainPage from "./components/MainPage";
import Results from "./components/Results";
import Privacy from "./components/Privacy";
import {ethers} from "ethers"
import {NftProvider, useNft} from "use-nft"
const fetcher = ["ethers", {
ethers,
provider: new ethers.providers.JsonRpcProvider(process.env.ETHEREUM_RPC_URL)
}]
function App() {
const fileSearchInput = {}
function fileSearch(fileInput) {
fileSearchInput.file = fileInput
}
return (
<NftProvider fetcher={fetcher}>
<Router>
<Switch>
<Route path="/:path(|main-page)">
<MainPage {...mainPageData} fileSearch={fileSearch}/>
</Route>
<Route path="/results">
<Results {...resultsData} fileSearchInput={fileSearchInput}/>
</Route>
<Route path="/privacy-policy">
<Privacy/>
</Route>
</Switch>
</Router>
</NftProvider>
);
}
export default App;
const resultsData = {
searchIcon: "/img/[email protected]",
overlapGroup: "/img/[email protected]",
};
const landingImages = [
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]",
"/img/[email protected]"
]
const mainPageData = {
landingImages: landingImages,
cameraImage: "/img/camera.svg",
};