mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
more formatting
This commit is contained in:
1 parent
046447b0fb
commit
f552c1212c
157 files changed
+635
-1579
No files matched your search
@@ -50,24 +50,20 @@ export const CallControls = ({ size }: { size?: 'small' | 'medium' }) => {
|
||||
|
||||
if (accepted || isTransmitter) {
|
||||
return (
|
||||
<StatusIconButton color='error' size={size} onClick={handleEndCall}>
|
||||
<StatusIconButton color="error" size={size} onClick={handleEndCall}>
|
||||
<CallEndIcon />
|
||||
</StatusIconButton>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Box m={SIZES_SPACING[size] || 1} display='inline'>
|
||||
<StatusIconButton color='error' size={size} onClick={handleRejectCall}>
|
||||
<Box m={SIZES_SPACING[size] || 1} display="inline">
|
||||
<StatusIconButton color="error" size={size} onClick={handleRejectCall}>
|
||||
<CallEndIcon className={classes.icon} />
|
||||
</StatusIconButton>
|
||||
</Box>
|
||||
<Box m={SIZES_SPACING[size] || 1} display='inline'>
|
||||
<StatusIconButton
|
||||
color='success'
|
||||
size={size}
|
||||
onClick={handleAcceptCall}
|
||||
>
|
||||
<Box m={SIZES_SPACING[size] || 1} display="inline">
|
||||
<StatusIconButton color="success" size={size} onClick={handleAcceptCall}>
|
||||
<CallIcon className={classes.icon} />
|
||||
</StatusIconButton>
|
||||
</Box>
|
||||
|
||||
@@ -19,7 +19,7 @@ export const CallModal = () => {
|
||||
<CallTimer isAccepted={call?.accepted} />
|
||||
</Box>
|
||||
<div className={classes.actions}>
|
||||
<CallControls size='medium' />
|
||||
<CallControls size="medium" />
|
||||
</div>
|
||||
</AppContent>
|
||||
</AppWrapper>
|
||||
|
||||
@@ -18,17 +18,13 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
}));
|
||||
|
||||
export const CallNotification = ({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) => {
|
||||
export const CallNotification = ({ children }: { children: React.ReactNode }) => {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<Box>{children}</Box>
|
||||
<Box className={classes.controls}>
|
||||
<CallControls size='small' />
|
||||
<CallControls size="small" />
|
||||
</Box>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -12,11 +12,7 @@ const NOTIFICATION_ID = 'call:current';
|
||||
export const useCallNotifications = () => {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const {
|
||||
addNotificationAlert,
|
||||
removeId,
|
||||
addNotification,
|
||||
} = useNotifications();
|
||||
const { addNotificationAlert, removeId, addNotification } = useNotifications();
|
||||
|
||||
const { play, stop } = useRingtoneSound();
|
||||
|
||||
@@ -69,7 +65,7 @@ export const useCallNotifications = () => {
|
||||
</CallNotification>
|
||||
),
|
||||
},
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,10 +5,9 @@ import { callerState } from './state';
|
||||
export const useDuration = () => {
|
||||
const [duration, setDuration] = useRecoilState(callerState.callDuration);
|
||||
|
||||
const resetDuration = useCallback(
|
||||
() => setDuration({ ms: 0, s: 0, m: 0, h: 0 }),
|
||||
[setDuration]
|
||||
);
|
||||
const resetDuration = useCallback(() => setDuration({ ms: 0, s: 0, m: 0, h: 0 }), [
|
||||
setDuration,
|
||||
]);
|
||||
|
||||
return { duration, setDuration, resetDuration };
|
||||
};
|
||||
Reference in new issue
Block a user