mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Make Camera app use router (#69)
* Make Camera app use router * Remove unused hooks * Fucking communicate messages with camera with router * Improved sharing in messages flow * Fix clipboard * Removeunused imports * improve routing helpers * Fix bug :D * Fix stupid thing * Add docs to useQueryParams hook
This commit is contained in:
1 parent
447c51a07e
commit
40f9555b39
34 files changed
+481
-294
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import { AppWrapper } from '../../../ui/components';
|
||||
import { AppContent } from '../../../ui/components/AppContent';
|
||||
import { usePhotoModal } from '../hooks/usePhotoModal';
|
||||
import { GalleryGrid } from './grid/GalleryGrid';
|
||||
import { GalleryModal } from './modal/GalleryModal';
|
||||
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
||||
import { Route, Switch } from 'react-router-dom';
|
||||
|
||||
InjectDebugData([
|
||||
{
|
||||
@@ -24,19 +24,13 @@ InjectDebugData([
|
||||
]);
|
||||
|
||||
const CameraApp = () => {
|
||||
const { modal } = usePhotoModal();
|
||||
|
||||
return (
|
||||
<AppWrapper id='camera-app'>
|
||||
<AppContent>
|
||||
<GalleryModal />
|
||||
{/*<Router>
|
||||
<Switch>
|
||||
<Route path="/camera/image" component={GalleryModal} />
|
||||
<Route path="/" exact component={GalleryGrid} />
|
||||
</Switch>
|
||||
</Router>*/}
|
||||
{!modal ? <GalleryGrid /> : null}
|
||||
<Switch>
|
||||
<Route path='/camera' exact component={GalleryGrid} />
|
||||
<Route path='/camera/image' exact component={GalleryModal} />
|
||||
</Switch>
|
||||
</AppContent>
|
||||
</AppWrapper>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user