mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
more formatting
This commit is contained in:
1 parent
046447b0fb
commit
f552c1212c
157 files changed
+635
-1579
No files matched your search
@@ -25,11 +25,11 @@ InjectDebugData([
|
||||
|
||||
const CameraApp = () => {
|
||||
return (
|
||||
<AppWrapper id='camera-app'>
|
||||
<AppWrapper id="camera-app">
|
||||
<AppContent>
|
||||
<Switch>
|
||||
<Route path='/camera' exact component={GalleryGrid} />
|
||||
<Route path='/camera/image' exact component={GalleryModal} />
|
||||
<Route path="/camera" exact component={GalleryGrid} />
|
||||
<Route path="/camera/image" exact component={GalleryModal} />
|
||||
</Switch>
|
||||
</AppContent>
|
||||
</AppWrapper>
|
||||
|
||||
@@ -14,9 +14,7 @@ export const GalleryGrid = () => {
|
||||
const history = useHistory();
|
||||
const query = useQueryParams();
|
||||
|
||||
const referal = query.referal
|
||||
? decodeURIComponent(query.referal)
|
||||
: '/camera/image';
|
||||
const referal = query.referal ? decodeURIComponent(query.referal) : '/camera/image';
|
||||
|
||||
const photos = usePhotos();
|
||||
|
||||
@@ -25,17 +23,15 @@ export const GalleryGrid = () => {
|
||||
};
|
||||
|
||||
const handlePhotoOpen = (photo) => {
|
||||
history.push(
|
||||
addQueryToLocation(getLocationFromUrl(referal), 'image', photo.image)
|
||||
);
|
||||
history.push(addQueryToLocation(getLocationFromUrl(referal), 'image', photo.image));
|
||||
};
|
||||
|
||||
if (!photos)
|
||||
return (
|
||||
<Box
|
||||
display='flex'
|
||||
flexWrap='wrap'
|
||||
alignContent='flex-start'
|
||||
display="flex"
|
||||
flexWrap="wrap"
|
||||
alignContent="flex-start"
|
||||
className={classes.root}
|
||||
>
|
||||
<Box>
|
||||
@@ -44,7 +40,7 @@ export const GalleryGrid = () => {
|
||||
style={{ borderRadius: 0 }}
|
||||
className={classes.photo}
|
||||
>
|
||||
<AddIcon fontSize='large' />
|
||||
<AddIcon fontSize="large" />
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
@@ -53,9 +49,9 @@ export const GalleryGrid = () => {
|
||||
return (
|
||||
<div>
|
||||
<Box
|
||||
display='flex'
|
||||
flexWrap='wrap'
|
||||
alignContent='flex-start'
|
||||
display="flex"
|
||||
flexWrap="wrap"
|
||||
alignContent="flex-start"
|
||||
className={classes.root}
|
||||
>
|
||||
<Box>
|
||||
@@ -64,7 +60,7 @@ export const GalleryGrid = () => {
|
||||
style={{ borderRadius: 0 }}
|
||||
className={classes.photo}
|
||||
>
|
||||
<AddIcon fontSize='large' />
|
||||
<AddIcon fontSize="large" />
|
||||
</Button>
|
||||
</Box>
|
||||
{photos.map((photo) => (
|
||||
|
||||
@@ -20,7 +20,7 @@ export const GalleryModal = () => {
|
||||
|
||||
const meta: ICameraPhoto = useMemo(
|
||||
() => ({ id: query.id as string, image: query.image as string }),
|
||||
[query]
|
||||
[query],
|
||||
);
|
||||
|
||||
const _handleClose = () => {
|
||||
@@ -42,11 +42,7 @@ export const GalleryModal = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<ShareModal
|
||||
referal={referal}
|
||||
meta={shareOpen}
|
||||
onClose={() => setShareOpen(null)}
|
||||
/>
|
||||
<ShareModal referal={referal} meta={shareOpen} onClose={() => setShareOpen(null)} />
|
||||
<Paper className={classes.modal}>
|
||||
<div className={shareOpen ? classes.backgroundModal : null} />
|
||||
<Button onClick={_handleClose}>
|
||||
@@ -58,10 +54,10 @@ export const GalleryModal = () => {
|
||||
/>
|
||||
<div className={classes.actionDiv}>
|
||||
<Button onClick={handleDeletePhoto}>
|
||||
<DeleteIcon fontSize='large' />
|
||||
<DeleteIcon fontSize="large" />
|
||||
</Button>
|
||||
<Button onClick={handleSharePhoto}>
|
||||
<ShareIcon fontSize='large' />
|
||||
<ShareIcon fontSize="large" />
|
||||
</Button>
|
||||
</div>
|
||||
</Paper>
|
||||
|
||||
@@ -33,7 +33,7 @@ export const ShareModal = ({ meta, onClose, referal }: IShareModalProps) => {
|
||||
</h4>
|
||||
<Button>{<MessageIcon />} Message</Button>
|
||||
<h4>Or just copy the image here:</h4>
|
||||
<Button onClick={handleCopyImage} variant='contained'>
|
||||
<Button onClick={handleCopyImage} variant="contained">
|
||||
Copy image
|
||||
</Button>
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user