forked from Shopify/shopify-frontend-template-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.jsx
35 lines (32 loc) · 922 Bytes
/
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
import { BrowserRouter } from "react-router-dom";
import { NavigationMenu } from "@shopify/app-bridge-react";
import Routes from "./Routes";
import {
AppBridgeProvider,
QueryProvider,
PolarisProvider,
} from "./components";
export default function App() {
// Any .tsx or .jsx files in /pages will become a route
// See documentation for <Routes /> for more info
const pages = import.meta.globEager("./pages/**/!(*.test.[jt]sx)*.([jt]sx)");
return (
<PolarisProvider>
<BrowserRouter>
<AppBridgeProvider>
<QueryProvider>
<NavigationMenu
navigationLinks={[
{
label: "Page name",
destination: "/pagename",
},
]}
/>
<Routes pages={pages} />
</QueryProvider>
</AppBridgeProvider>
</BrowserRouter>
</PolarisProvider>
);
}