-
Notifications
You must be signed in to change notification settings - Fork 62
/
App.jsx
29 lines (26 loc) · 861 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
import { BrowserRouter } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { NavMenu } from "@shopify/app-bridge-react";
import Routes from "./Routes";
import { 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.glob("./pages/**/!(*.test.[jt]sx)*.([jt]sx)", {
eager: true,
});
const { t } = useTranslation();
return (
<PolarisProvider>
<BrowserRouter>
<QueryProvider>
<NavMenu>
<a href="/" rel="home" />
<a href="/pagename">{t("NavigationMenu.pageName")}</a>
</NavMenu>
<Routes pages={pages} />
</QueryProvider>
</BrowserRouter>
</PolarisProvider>
);
}