mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +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
@@ -5,14 +5,13 @@ import useStyles from './form.styles';
|
||||
import SendIcon from '@material-ui/icons/Send';
|
||||
import ImageIcon from '@material-ui/icons/Image';
|
||||
import Nui from '../../../../os/nui-events/utils/Nui';
|
||||
import { useImageModal } from '../../hooks/useImageModal';
|
||||
|
||||
interface IProps {
|
||||
onAddImageClick(): void;
|
||||
messageGroupId: string | undefined;
|
||||
}
|
||||
|
||||
const MessageInput = ({ messageGroupId }: IProps) => {
|
||||
const { setImageModal } = useImageModal();
|
||||
const MessageInput = ({ messageGroupId, onAddImageClick }: IProps) => {
|
||||
const classes = useStyles();
|
||||
const { t } = useTranslation();
|
||||
const [message, setMessage] = useState('');
|
||||
@@ -29,10 +28,6 @@ const MessageInput = ({ messageGroupId }: IProps) => {
|
||||
}
|
||||
};
|
||||
|
||||
const openImageModal = () => {
|
||||
setImageModal(true);
|
||||
};
|
||||
|
||||
if (!messageGroupId) return null;
|
||||
|
||||
return (
|
||||
@@ -48,7 +43,7 @@ const MessageInput = ({ messageGroupId }: IProps) => {
|
||||
className: classes.messagesInput,
|
||||
}}
|
||||
/>
|
||||
<Button className={classes.sendButton} onClick={openImageModal}>
|
||||
<Button className={classes.sendButton} onClick={onAddImageClick}>
|
||||
<ImageIcon />
|
||||
</Button>
|
||||
<Button className={classes.sendButton} type='submit'>
|
||||
|
||||
Reference in new issue
Block a user