mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
tweak(phone/photos): Tweaked type for photo referral
This commit is contained in:
1 parent
b9243e9ca3
commit
214da78056
2 files changed
+6
-8
No files matched your search
@@ -7,9 +7,8 @@ import ShareIcon from '@material-ui/icons/Share';
|
|||||||
import Nui from '../../../../os/nui-events/utils/Nui';
|
import Nui from '../../../../os/nui-events/utils/Nui';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
import { useQueryParams } from '../../../../common/hooks/useQueryParams';
|
import { useQueryParams } from '../../../../common/hooks/useQueryParams';
|
||||||
import { ICameraPhoto } from '../../hooks/usePhotos';
|
|
||||||
import { ShareModal } from './ShareModal';
|
import { ShareModal } from './ShareModal';
|
||||||
import { PhotoEvents } from '../../../../../../typings/photo';
|
import { IPhoto, PhotoEvents } from '../../../../../../typings/photo';
|
||||||
|
|
||||||
export const GalleryModal = () => {
|
export const GalleryModal = () => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
@@ -19,10 +18,9 @@ export const GalleryModal = () => {
|
|||||||
|
|
||||||
const [shareOpen, setShareOpen] = useState(null);
|
const [shareOpen, setShareOpen] = useState(null);
|
||||||
|
|
||||||
const meta: ICameraPhoto = useMemo(
|
const meta: IPhoto = useMemo(() => ({ id: parseInt(query.id), image: query.image as string }), [
|
||||||
() => ({ id: query.id as string, image: query.image as string }),
|
query,
|
||||||
[query],
|
]);
|
||||||
);
|
|
||||||
|
|
||||||
const _handleClose = () => {
|
const _handleClose = () => {
|
||||||
history.push(referal);
|
history.push(referal);
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import MessageIcon from '@material-ui/icons/Message';
|
|||||||
import { setClipboard } from '../../../../os/phone/hooks/useClipboard';
|
import { setClipboard } from '../../../../os/phone/hooks/useClipboard';
|
||||||
|
|
||||||
import useStyles from './modal.styles';
|
import useStyles from './modal.styles';
|
||||||
import { ICameraPhoto } from '../../hooks/usePhotos';
|
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
import { IPhoto } from '../../../../../../typings/photo';
|
||||||
|
|
||||||
interface IShareModalProps {
|
interface IShareModalProps {
|
||||||
meta: ICameraPhoto;
|
meta: IPhoto;
|
||||||
referal: string;
|
referal: string;
|
||||||
onClose(): void;
|
onClose(): void;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user