Skip to content

Commit

Permalink
Prepare resolving of ff URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminaaron committed Oct 26, 2024
1 parent efd49dd commit 3a3ecd0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import InfoScreenNewOrExistingUser from "./screens/info-screen/InfoScreenNewOrEx
import ProfileScreen from "./screens/profile-screen/ProfileScreen";
import ActivityLogScreen from "./screens/activity-log/ActivityLogScreen";
import {LanguageProvider} from "./language/LanguageContext";
import ResolveUriScreen from "./screens/resolve-uri/ResolveUriScreen";

const theme = createTheme({});

Expand All @@ -41,6 +42,7 @@ const App = () => {
<Route path="/benefit-page/:id" element={<BenefitPageScreen/>}/>
<Route path="/profile-overview" element={<ProfileScreen/>}/>
<Route path="/activity-log" element={<ActivityLogScreen/>}/>
<Route path="/default" element={<ResolveUriScreen/>}/>
</Routes>
</div>
</Router>
Expand Down
27 changes: 27 additions & 0 deletions src/screens/resolve-uri/ResolveUriScreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import Layout from "../../components/Layout";
import AppScreenWrapper from "../../components/AppScreenWrapper";
import {useStore} from "../../components/ViewportUpdater";
import {useLocation} from "react-router-dom";

const ResolveUriScreen = () => {
const isDesktop = useStore((state) => state.isDesktop);
const location = useLocation();
const localName = location.hash.substring(1)

return (
<Layout isApp={true} logo={false} back={'Back'}>
<AppScreenWrapper isDesktop={isDesktop} back={false}>
{localName ?
<>
{`https://foerderfunke.org/default#${localName}`}
</>
:
'No local name in URI'
}
</AppScreenWrapper>
</Layout>
);
};

export default ResolveUriScreen;

0 comments on commit 3a3ecd0

Please sign in to comment.