Skip to content

Commit

Permalink
boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
shocknet-justin committed Sep 15, 2024
1 parent e63a767 commit cbea8c4
Showing 1 changed file with 104 additions and 98 deletions.
202 changes: 104 additions & 98 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import LoadingOverlay from "./Components/LoadingOverlay";

setupIonicReact();

const App: React.FC = () => {
const AppContent: React.FC = () => {
const dispatch = useDispatch();

useEffect(() => {
Expand All @@ -63,9 +63,7 @@ const App: React.FC = () => {
const inviteToken = url.searchParams.get('inviteToken');

if (addSource) {
// Dispatch an action to show the confirmation dialog
dispatch({ type: 'SHOW_ADD_SOURCE_CONFIRMATION', payload: { addSource, inviteToken } });
// Clear the URL parameters
window.history.replaceState({}, document.title, url.pathname);
}
};
Expand All @@ -78,6 +76,108 @@ const App: React.FC = () => {
};
}, [dispatch]);

return (
<>
<AppUrlListener />
<Background />
<LoadingOverlay />
<IonRouterOutlet>
<Route exact path="/">
<Layout>
<NodeUp />
</Layout>
</Route>
<Route exact path="/loader">
<Layout>
<Loader />
</Layout>
</Route>
<Route exact path="/home">
<Layout>
<Home />
</Layout>
</Route>
<Route exact path="/receive">
<Layout>
<Receive />
</Layout>
</Route>
<Route exact path="/send">
<Layout>
<Send />
</Layout>
</Route>
<Route exact path="/scan">
<Layout>
<Scan />
</Layout>
</Route>
<Route exact path="/sources">
<Layout>
<Sources />
</Layout>
</Route>
<Route exact path="/automation">
<Layout>
<Automation />
</Layout>
</Route>
<Route exact path="/prefs">
<Layout>
<Prefs />
</Layout>
</Route>
<Route exact path="/contacts">
<Layout>
<Contacts />
</Layout>
</Route>
<Route exact path="/invitations">
<Layout>
<Invitations />
</Layout>
</Route>
<Route exact path="/auth">
<Layout>
<Auth />
</Layout>
</Route>
<Route exact path="/notify">
<Layout>
<Notify />
</Layout>
</Route>
<Route exact path="/metrics">
<Layout>
<Metrics />
</Layout>
</Route>
<Route exact path="/manage">
<Layout>
<Manage />
</Layout>
</Route>
<Route exact path="/channels">
<Layout>
<Channels />
</Layout>
</Route>
<Route exact path="/LApps">
<Layout>
<LinkedApp />
</Layout>
</Route>
<Route exact path="/Offers">
<Layout>
<Offers />
</Layout>
</Route>
</IonRouterOutlet>
</>
);
};

const App: React.FC = () => {
const setStatusBarColor = async () => {

Check failure on line 181 in src/App.tsx

View workflow job for this annotation

GitHub Actions / build

'setStatusBarColor' is assigned a value but never used. Allowed unused vars must match /^_/u
await StatusBar.setBackgroundColor({ color: "#16191c" });
};
Expand All @@ -87,101 +187,7 @@ const App: React.FC = () => {
<IonApp className="safe-area">
<ErrorBoundary>
<IonReactRouter>
<AppUrlListener />
<Background />
<LoadingOverlay />
<IonRouterOutlet>
<Route exact path="/">
<Layout>
<NodeUp />
</Layout>
</Route>
<Route exact path="/loader">
<Layout>
<Loader />
</Layout>
</Route>
<Route exact path="/home">
<Layout>
<Home />
</Layout>
</Route>
<Route exact path="/receive">
<Layout>
<Receive />
</Layout>
</Route>
<Route exact path="/send">
<Layout>
<Send />
</Layout>
</Route>
<Route exact path="/scan">
<Layout>
<Scan />
</Layout>
</Route>
<Route exact path="/sources">
<Layout>
<Sources />
</Layout>
</Route>
<Route exact path="/automation">
<Layout>
<Automation />
</Layout>
</Route>
<Route exact path="/prefs">
<Layout>
<Prefs />
</Layout>
</Route>
<Route exact path="/contacts">
<Layout>
<Contacts />
</Layout>
</Route>
<Route exact path="/invitations">
<Layout>
<Invitations />
</Layout>
</Route>
<Route exact path="/auth">
<Layout>
<Auth />
</Layout>
</Route>
<Route exact path="/notify">
<Layout>
<Notify />
</Layout>
</Route>
<Route exact path="/metrics">
<Layout>
<Metrics />
</Layout>
</Route>
<Route exact path="/manage">
<Layout>
<Manage />
</Layout>
</Route>
<Route exact path="/channels">
<Layout>
<Channels />
</Layout>
</Route>
<Route exact path="/LApps">
<Layout>
<LinkedApp />
</Layout>
</Route>
<Route exact path="/Offers">
<Layout>
<Offers />
</Layout>
</Route>
</IonRouterOutlet>
<AppContent />
</IonReactRouter>
</ErrorBoundary>
<ToastContainer
Expand Down

0 comments on commit cbea8c4

Please sign in to comment.