mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 14:38:45 +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 { useHistory } from 'react-router-dom';
|
||||
import { useQueryParams } from '../../../../common/hooks/useQueryParams';
|
||||
import { ICameraPhoto } from '../../hooks/usePhotos';
|
||||
import { ShareModal } from './ShareModal';
|
||||
import { PhotoEvents } from '../../../../../../typings/photo';
|
||||
import { IPhoto, PhotoEvents } from '../../../../../../typings/photo';
|
||||
|
||||
export const GalleryModal = () => {
|
||||
const classes = useStyles();
|
||||
@@ -19,10 +18,9 @@ export const GalleryModal = () => {
|
||||
|
||||
const [shareOpen, setShareOpen] = useState(null);
|
||||
|
||||
const meta: ICameraPhoto = useMemo(
|
||||
() => ({ id: query.id as string, image: query.image as string }),
|
||||
[query],
|
||||
);
|
||||
const meta: IPhoto = useMemo(() => ({ id: parseInt(query.id), image: query.image as string }), [
|
||||
query,
|
||||
]);
|
||||
|
||||
const _handleClose = () => {
|
||||
history.push(referal);
|
||||
|
||||
@@ -5,11 +5,11 @@ import MessageIcon from '@material-ui/icons/Message';
|
||||
import { setClipboard } from '../../../../os/phone/hooks/useClipboard';
|
||||
|
||||
import useStyles from './modal.styles';
|
||||
import { ICameraPhoto } from '../../hooks/usePhotos';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { IPhoto } from '../../../../../../typings/photo';
|
||||
|
||||
interface IShareModalProps {
|
||||
meta: ICameraPhoto;
|
||||
meta: IPhoto;
|
||||
referal: string;
|
||||
onClose(): void;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user