mad formatting

This commit is contained in:
Christopher committed 2021-03-02 20:41:25 +01:00
1 parent 6777498bcc
commit 046447b0fb
74 files changed
+329 -309

No files matched your search

+1 -1
View File
@@ -7,6 +7,6 @@ interface BankModalProps {
}
export const useBankModal = (): BankModalProps => {
const [ showBankModal, setShowBankModal ] = useRecoilState(bankState.bankModal);
const [showBankModal, setShowBankModal] = useRecoilState(bankState.bankModal);
return { showBankModal, setShowBankModal };
};
+1 -1
View File
@@ -10,7 +10,7 @@ export const useBankService = () => {
const setTransaction = useSetRecoilState(bankState.transactions);
const setCredentials = useSetRecoilState(bankState.bankCredentials);
const setNotification = useSetRecoilState(bankState.notification);
const { addAlert } = useSnackbar()
const { addAlert } = useSnackbar();
useNuiEvent('BANK', 'setTransaction', setTransaction);
useNuiEvent('BANK', 'setCredentials', setCredentials);
@@ -1,7 +1,7 @@
import React from 'react';
import { SvgIcon, SvgIconProps } from '@material-ui/core';
export const CalculatorIcon = ({ ...props}: SvgIconProps) => {
export const CalculatorIcon = ({ ...props }: SvgIconProps) => {
return (
<SvgIcon {...props}>
<svg
@@ -1,11 +1,7 @@
import React from 'react';
import { InputBase } from '@material-ui/core';
import SearchIcon from '@material-ui/icons/Search';
import {
createStyles,
Theme,
makeStyles,
} from '@material-ui/core/styles';
import { createStyles, Theme, makeStyles } from '@material-ui/core/styles';
import { useTranslation } from 'react-i18next';
@@ -60,7 +60,9 @@ const ContactsInfoPage = () => {
const { getContact } = useContacts();
const { id } = useParams<ContactInfoRouteParams>();
const { addNumber, referal } = useQueryParams<ContactInfoRouteQuery>({ referal: '/contacts' });
const { addNumber, referal } = useQueryParams<ContactInfoRouteQuery>({
referal: '/contacts',
});
const contact = getContact(parseInt(id));
+1 -1
View File
@@ -20,5 +20,5 @@ export const contactsState = {
contactDetail: atom({
key: 'contactDetail',
default: null,
})
}),
};
@@ -6,8 +6,8 @@ import { useSnackbar } from '../../../ui/hooks/useSnackbar';
export const useContactsService = () => {
const setContacts = useSetRecoilState(contactsState.contacts);
const { addAlert } = useSnackbar()
const { addAlert } = useSnackbar();
useNuiEvent('CONTACTS', 'setContacts', setContacts);
useNuiEvent('CONTACTS', 'setAlert', addAlert);
return useContacts();
@@ -19,7 +19,12 @@ const ButtonItem = ({ label, onClick }: IBtnItem) => {
const classes = useStyles();
return (
<Grid key={label} item xs={4}>
<Button fullWidth size="large" className={classes.gridItem} onClick={onClick}>
<Button
fullWidth
size='large'
className={classes.gridItem}
onClick={onClick}
>
{label}
</Button>
</Grid>
@@ -27,10 +32,10 @@ const ButtonItem = ({ label, onClick }: IBtnItem) => {
};
export const DialGrid = () => {
const { add, removeOne, clear} = useContext(DialInputCtx)
const { add, removeOne, clear } = useContext(DialInputCtx);
return (
<Box height="100%">
<Box height='100%'>
<Grid container justify='space-around'>
<ButtonItem label={1} onClick={() => add(1)} />
<ButtonItem label={2} onClick={() => add(2)} />
@@ -39,8 +39,8 @@ export const DialerInput = () => {
};
const handleNewContact = (number: string) => {
history.push(`/contacts/-1/?addNumber=${number}&referal=/phone/contacts`)
}
history.push(`/contacts/-1/?addNumber=${number}&referal=/phone/contacts`);
};
return (
<Box component={Paper} className={classes.root}>
@@ -50,10 +50,13 @@ export const DialerInput = () => {
value={inputVal}
/>
<IconButton color='primary' className={classes.iconBtn}>
<PhoneIcon fontSize="large" onClick={() => handleCall(inputVal)} />
<PhoneIcon fontSize='large' onClick={() => handleCall(inputVal)} />
</IconButton>
<IconButton className={classes.iconBtn}>
<PersonAddIcon fontSize="large" onClick={() => handleNewContact(inputVal)} />
<PersonAddIcon
fontSize='large'
onClick={() => handleNewContact(inputVal)}
/>
</IconButton>
</Box>
);
@@ -42,7 +42,7 @@ const DialerNavBar = () => {
<BottomNavigationAction
label='Dial'
value='/phone/dial'
color="secondary"
color='secondary'
component={NavLink}
icon={<PhoneIcon />}
to='/phone/dial'
@@ -50,7 +50,7 @@ const DialerNavBar = () => {
<BottomNavigationAction
label='Contacts'
value='/phone/contacts'
color="secondary"
color='secondary'
component={NavLink}
icon={<PersonIcon />}
to='/phone/contacts'
@@ -62,10 +62,7 @@ export const DialerHistory = ({ calls }) => {
<List disablePadding>
{calls.map((call: ICall) =>
call.transmitter === number ? (
<ListItem
key={call.id}
divider
>
<ListItem key={call.id} divider>
<ListItemIcon>
{<PhoneForwardedIcon className={classes.callForward} />}
</ListItemIcon>
@@ -91,10 +88,7 @@ export const DialerHistory = ({ calls }) => {
) : null}
</ListItem>
) : (
<ListItem
key={call.id}
divider
>
<ListItem key={call.id} divider>
<ListItemIcon>
{<PhoneCallbackIcon className={classes.callBack} />}
</ListItemIcon>
+5 -5
View File
@@ -1,4 +1,4 @@
import { common, green } from "@material-ui/core/colors";
import { common, green } from '@material-ui/core/colors';
export const DIALER_APP_PRIMARY_COLOR = green[600];
export const DIALER_APP_TEXT_COLOR = common.white;
@@ -9,9 +9,9 @@ const theme = {
main: DIALER_APP_PRIMARY_COLOR,
dark: green[800],
light: green[400],
contrastText: DIALER_APP_TEXT_COLOR
}
}
}
contrastText: DIALER_APP_TEXT_COLOR,
},
},
};
export default theme;
+5 -5
View File
@@ -1,9 +1,9 @@
const theme = {
palette: {
primary: {
main: '#f23123'
}
}
}
main: '#f23123',
},
},
};
export default theme;
export default theme;
+1 -1
View File
@@ -8,7 +8,7 @@ export const HomeApp = () => {
const { apps } = useApps();
return (
<AppWrapper>
<Box component="div" mt={6} px={1}>
<Box component='div' mt={6} px={1}>
{apps && <GridMenu xs={3} items={apps} />}
</Box>
</AppWrapper>
@@ -21,13 +21,9 @@ export function NewMessageGroupButton({
const classes = useStyles();
return (
<Fab
className={classes.root}
color='primary'
onClick={onClick}
>
<AddIcon />
</Fab>
<Fab className={classes.root} color='primary' onClick={onClick}>
<AddIcon />
</Fab>
);
}
@@ -101,8 +101,14 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => {
</Box>
)}
<Box px={2} py={3}>
<Button disabled={submitDisabled} variant='contained' fullWidth color='primary' type='submit'>
{t('APPS_MESSAGES_NEW_MESSAGE_GROUP_SUBMIT')}
<Button
disabled={submitDisabled}
variant='contained'
fullWidth
color='primary'
type='submit'
>
{t('APPS_MESSAGES_NEW_MESSAGE_GROUP_SUBMIT')}
</Button>
</Box>
</form>
@@ -41,7 +41,12 @@ const MessagesList = (): any => {
goToConversation(findGroup);
}
}
}, [messageGroups, createMessageGroupResult, goToConversation, clearMessageGroupResult]);
}, [
messageGroups,
createMessageGroupResult,
goToConversation,
clearMessageGroupResult,
]);
if (!messageGroups) return null;
@@ -84,7 +84,6 @@ export const MessageImageModal = ({
})}`
),
},
],
[history, pathname, search]
);
+16 -3
View File
@@ -1,5 +1,9 @@
import { useRecoilState, useRecoilValue } from 'recoil';
import { CreateMessageGroupResult, Message, MessageGroup } from '../../../common/typings/messages';
import {
CreateMessageGroupResult,
Message,
MessageGroup,
} from '../../../common/typings/messages';
import { messageState } from './state';
interface IUseMessages {
@@ -18,11 +22,20 @@ export default (): IUseMessages => {
messageState.messageGroups
);
const [createMessageGroupResult, setCreateMessageGroupResult] = useRecoilState<CreateMessageGroupResult | null>(
const [
createMessageGroupResult,
setCreateMessageGroupResult,
] = useRecoilState<CreateMessageGroupResult | null>(
messageState.createMessageGroupResult
);
const clearMessageGroupResult = () => setCreateMessageGroupResult(null);
return { messages, setMessages, messageGroups, createMessageGroupResult, clearMessageGroupResult };
return {
messages,
setMessages,
messageGroups,
createMessageGroupResult,
clearMessageGroupResult,
};
};
+1 -1
View File
@@ -9,7 +9,7 @@ const theme = {
main: MESSAGES_APP_PRIMARY_COLOR,
dark: amber[900],
light: amber[100],
contrastText: MESSAGES_APP_TEXT_COLOR
contrastText: MESSAGES_APP_TEXT_COLOR,
},
},
};
+1 -1
View File
@@ -12,5 +12,5 @@ export const noteStates = {
noteDetail: atom({
key: 'noteDetail',
default: null,
})
}),
};
+2 -2
View File
@@ -1,6 +1,6 @@
import { useRecoilValue } from 'recoil';
import { Note } from '../../../common/typings/notes';
import { noteStates } from './state';
import { noteStates } from './state';
interface NotesProps {
notes: Note[];
@@ -9,4 +9,4 @@ interface NotesProps {
export const useNotes = (): NotesProps => {
const notes = useRecoilValue(noteStates.noteItems);
return { notes };
}
};
+4 -4
View File
@@ -102,7 +102,7 @@ export const NoteModal = () => {
<Typography paragraph>{detail.content.length}/250</Typography>
{!detail.id ? (
<>
<Box display="inline" p={1}>
<Box display='inline' p={1}>
<Button
color='primary'
variant='contained'
@@ -112,7 +112,7 @@ export const NoteModal = () => {
{t('GENERIC_SAVE')}
</Button>
</Box>
<Box display="inline" p={1}>
<Box display='inline' p={1}>
<StatusButton
color='error'
variant='contained'
@@ -124,7 +124,7 @@ export const NoteModal = () => {
</>
) : (
<>
<Box display="inline" p={1}>
<Box display='inline' p={1}>
<Button
color='primary'
variant='contained'
@@ -133,7 +133,7 @@ export const NoteModal = () => {
{t('GENERIC_UPDATE')}
</Button>
</Box>
<Box display="inline" p={1}>
<Box display='inline' p={1}>
<StatusButton
color='error'
variant='contained'
+5 -5
View File
@@ -1,4 +1,4 @@
import { common, yellow } from "@material-ui/core/colors";
import { common, yellow } from '@material-ui/core/colors';
export const NOTES_APP_PRIMARY_COLOR = yellow[800];
export const NOTES_APP_ICON_COLOR = common.white;
@@ -10,9 +10,9 @@ const theme = {
main: NOTES_APP_PRIMARY_COLOR,
dark: yellow[900],
light: yellow[500],
contrastText: NOTES_APP_TEXT_COLOR
}
}
}
contrastText: NOTES_APP_TEXT_COLOR,
},
},
};
export default theme;
@@ -1,4 +1,4 @@
import { createAppThemeProvider } from "../../../os/apps/utils/createAppThemeProvider";
import { createAppThemeProvider } from '../../../os/apps/utils/createAppThemeProvider';
import notesTheme from '../notes.theme';
export const NotesThemeProvider = createAppThemeProvider(notesTheme);
@@ -31,7 +31,7 @@ const useStyles = makeStyles((theme) => ({
marginBottom: 20,
},
icon: {
color: theme.palette.primary.main
color: theme.palette.primary.main,
},
header: {
margin: 10,
@@ -11,4 +11,4 @@ export const useSelloutService = () => {
useNuiEvent('SELLOUT', 'setAlert', addAlert);
useNuiEvent('SELLOUT', 'setListings', setSellout);
return useListing();
};
};
@@ -1,4 +1,4 @@
import { createAppThemeProvider } from "../../../os/apps/utils/createAppThemeProvider";
import { createAppThemeProvider } from '../../../os/apps/utils/createAppThemeProvider';
import selloutTheme from '../sellout.theme';
+5 -5
View File
@@ -1,4 +1,4 @@
import { common, red } from "@material-ui/core/colors";
import { common, red } from '@material-ui/core/colors';
export const SELLOUT_APP_PRIMARY_COLOR = red[500];
export const SELLOUT_APP_ICON_COLOR = common.white;
@@ -10,9 +10,9 @@ const theme = {
main: SELLOUT_APP_PRIMARY_COLOR,
dark: red[700],
light: red[200],
contrastText: SELLOUT_APP_TEXT_COLOR
}
}
}
contrastText: SELLOUT_APP_TEXT_COLOR,
},
},
};
export default theme;
@@ -186,7 +186,8 @@ InjectDebugData(
profile_name: 'ItsChip',
isMine: false,
isReported: false,
message: 'I have tweeted this because Im even more badass... And I need this to be longer so I will continue to write',
message:
'I have tweeted this because Im even more badass... And I need this to be longer so I will continue to write',
},
},
],
@@ -23,10 +23,9 @@ export const ImagePrompt = ({ visible, value, handleChange }) => {
textFieldRef.current && textFieldRef.current.focus();
}, [visible]);
const handleImageChange = useCallback(
(e) => handleChange(e.target.value),
[handleChange]
);
const handleImageChange = useCallback((e) => handleChange(e.target.value), [
handleChange,
]);
if (!visible) return null;
return (
@@ -15,7 +15,7 @@ const useStyles = makeStyles({
},
textFieldInput: {
fontSize: '22px',
paddingTop: '8px'
paddingTop: '8px',
},
});
@@ -30,7 +30,7 @@ function processTweet(tweet) {
* there and have moved that logic here instead.
*/
export const useTwitterService = () => {
const { addAlert } = useSnackbar()
const { addAlert } = useSnackbar();
const { setNotification } = useTwitterNotifications();
const setProfile = useSetRecoilState(twitterState.profile);
@@ -38,7 +38,6 @@ export const useTwitterService = () => {
twitterState.updateProfileLoading
);
const setTweets = useSetRecoilState(twitterState.tweets);
const setFilteredTweets = useSetRecoilState(twitterState.filteredTweets);
const setCreateLoading = useSetRecoilState(twitterState.createTweetLoading);
@@ -58,4 +57,4 @@ export const useTwitterService = () => {
useNuiEvent(APP_TWITTER, 'createTweetLoading', setCreateLoading);
useNuiEvent(APP_TWITTER, 'createTweetResult', addAlert);
useNuiEvent(APP_TWITTER, 'createTweetBroadcast', setNotification);
};
};
+2 -3
View File
@@ -1,4 +1,3 @@
export function getNewLineCount(message: string): number {
return message.split(/\r\n|\r|\n/).length;
}
return message.split(/\r\n|\r|\n/).length;
}
+1 -1
View File
@@ -1,4 +1,4 @@
export interface IAlertProps {
message: string;
type: 'success' | 'error';
}
}
+1 -1
View File
@@ -6,4 +6,4 @@ export interface MarketplaceListing {
title: string;
url: string;
description: string;
}
}
+2 -4
View File
@@ -1,18 +1,16 @@
export type AlertCategory =
export type AlertCategory =
| 'NOTES_ADD_SUCCESS'
| 'NOTES_ADD_FAILED'
| 'NOTES_UPDATE_SUCCESS'
| 'NOTES_UPDATE_FAILED'
| 'NOTES_DELETE_SUCCESS'
| 'NOTES_DELETE_FAILED'
| 'NOTES_DELETE_FAILED';
export interface INotesAlert {
alert: AlertCategory;
setAlert: (type: AlertCategory) => void;
}
export interface Note {
id?: number;
title: string;
+36 -36
View File
@@ -1,37 +1,37 @@
{
"Locale": "en",
"KeyTogglePhone": 288,
"KeyTakeCall": 38,
"PhoneAsItem": false,
"SwimDestroy": false,
"RunRate": 10,
"DestoryChance": 100,
"DestroyPhoneReCheck": 3,
"notificationPosition": {
"horizontal": "right",
"vertical": "top"
},
"general": {
"useDashNumber": true
},
"twitter": {
"showNotifications": true,
"generateProfileNameFromUsers": true,
"allowEdtiableProfileName": true,
"allowDeleteTweets": true,
"allowReportTweets": true,
"characterLimit": 160,
"newLineLimit": 10,
"enableAvatars": true,
"enableEmojis": true,
"enableImages": true,
"maxImages": 3
},
"bank": {
"showNotifications": true
},
"debug": {
"level": "debug",
"enabled": true
}
}
"Locale": "en",
"KeyTogglePhone": 288,
"KeyTakeCall": 38,
"PhoneAsItem": false,
"SwimDestroy": false,
"RunRate": 10,
"DestoryChance": 100,
"DestroyPhoneReCheck": 3,
"notificationPosition": {
"horizontal": "right",
"vertical": "top"
},
"general": {
"useDashNumber": true
},
"twitter": {
"showNotifications": true,
"generateProfileNameFromUsers": true,
"allowEdtiableProfileName": true,
"allowDeleteTweets": true,
"allowReportTweets": true,
"characterLimit": 160,
"newLineLimit": 10,
"enableAvatars": true,
"enableEmojis": true,
"enableImages": true,
"maxImages": 3
},
"bank": {
"showNotifications": true
},
"debug": {
"level": "debug",
"enabled": true
}
}
+1 -1
View File
@@ -100,7 +100,7 @@
"APPS_NOTES_UPDATE_FAILED": "Failed to update note.",
"APPS_NOTES_DELETE_SUCCESS": "Successfully deleted note.",
"APPS_NOTES_DELETE_FAILED": "Failed to delete note.",
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
"APPS_MARKETPLACE_CREATE_LISTING_SUCCESS": "Successfully created a new listing",
+1 -1
View File
@@ -113,7 +113,7 @@
"APPS_SETTINGS_OPTION_ZOOM": "Ampliar",
"APPS_SETTINGS_OPTION_RINGTONE": "Tono de llamada",
"APPS_SETTINGS_OPTION_RINGTONEVOL": "Volumen del tono de llamada",
"APPS_SETTINGS_OPTION_NOTIFICATION": "Notificacion",
"APPS_SETTINGS_OPTION_NOTIFICATIONVOL": "Notificacion de volumen",
+1 -1
View File
@@ -115,7 +115,7 @@
"APPS_SETTINGS_OPTION_RINGTONEVOL": "Volume de la sonnerie",
"APPS_SETTINGS_OPTION_NOTIFICATION": "Notification",
"APPS_SETTINGS_OPTION_NOTIFICATIONVOL": "Volume des notifications",
"GENERIC_SAVE": "Sauvegarder",
"GENERIC_UPDATE": "Mettre à jour",
"GENERIC_DELETE": "Supprimer",
+17 -13
View File
@@ -1,10 +1,5 @@
import React from 'react';
import {
blue,
common,
grey,
purple,
} from '@material-ui/core/colors';
import { blue, common, grey, purple } from '@material-ui/core/colors';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
faAd,
@@ -41,9 +36,18 @@ import {
CONTACTS_APP_PRIMARY_COLOR,
CONTACTS_APP_TEXT_COLOR,
} from '../../../apps/contacts/contacts.theme';
import { SELLOUT_APP_PRIMARY_COLOR, SELLOUT_APP_ICON_COLOR } from '../../../apps/sellout/sellout.theme';
import { NOTES_APP_ICON_COLOR, NOTES_APP_PRIMARY_COLOR } from '../../../apps/notes/notes.theme';
import { DIALER_APP_PRIMARY_COLOR, DIALER_APP_TEXT_COLOR } from '../../../apps/dialer/dialer.theme';
import {
SELLOUT_APP_PRIMARY_COLOR,
SELLOUT_APP_ICON_COLOR,
} from '../../../apps/sellout/sellout.theme';
import {
NOTES_APP_ICON_COLOR,
NOTES_APP_PRIMARY_COLOR,
} from '../../../apps/notes/notes.theme';
import {
DIALER_APP_PRIMARY_COLOR,
DIALER_APP_TEXT_COLOR,
} from '../../../apps/dialer/dialer.theme';
export interface IAppConfig {
id: string;
@@ -70,7 +74,7 @@ export const APPS: IAppConfig[] = [
{
id: 'MESSAGES',
nameLocale: 'APPS_MESSAGES',
icon: <MessageIcon fontSize="large" />,
icon: <MessageIcon fontSize='large' />,
notificationIcon: <MessageIcon fontSize='small' />,
backgroundColor: MESSAGES_APP_PRIMARY_COLOR,
color: MESSAGES_APP_TEXT_COLOR,
@@ -82,7 +86,7 @@ export const APPS: IAppConfig[] = [
{
id: 'CONTACTS',
nameLocale: 'APPS_CONTACTS',
icon: <ContactsIcon fontSize="large" />,
icon: <ContactsIcon fontSize='large' />,
notificationIcon: <ContactsIcon fontSize='small' />,
backgroundColor: CONTACTS_APP_PRIMARY_COLOR,
color: CONTACTS_APP_TEXT_COLOR,
@@ -94,7 +98,7 @@ export const APPS: IAppConfig[] = [
{
id: 'CALCULATOR',
nameLocale: 'APPS_CALCULATOR',
icon: <CalculatorIcon fontSize="large" />,
icon: <CalculatorIcon fontSize='large' />,
notificationIcon: <CalculatorIcon fontSize='small' />,
backgroundColor: purple[500],
color: grey[50],
@@ -106,7 +110,7 @@ export const APPS: IAppConfig[] = [
{
id: 'SETTINGS',
nameLocale: 'APPS_SETTINGS',
icon: <SettingsIcon fontSize="large" />,
icon: <SettingsIcon fontSize='large' />,
notificationIcon: <SettingsIcon fontSize='small' />,
backgroundColor: '#383838',
color: grey[50],
+2 -2
View File
@@ -5,7 +5,7 @@
* @returns {boolean}
*/
export function isObject(item) {
return (item && typeof item === 'object' && !Array.isArray(item));
return item && typeof item === 'object' && !Array.isArray(item);
}
/**
@@ -29,4 +29,4 @@ export function deepMergeObjects(target, ...sources) {
}
return deepMergeObjects(target, ...sources);
}
}
+1 -1
View File
@@ -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>
+5 -7
View File
@@ -1,7 +1,6 @@
import React, { useEffect, useRef } from 'react';
import { useDuration } from '../hooks/useDuration';
const runTimer = (updatedTime, setDuration) => {
let newTime = { ...updatedTime.current };
if (newTime.m >= 60) {
@@ -17,25 +16,24 @@ const runTimer = (updatedTime, setDuration) => {
newTime = { ...newTime, ms: newTime.ms + 1 };
updatedTime.current = newTime;
setDuration(newTime);
}
};
function CallTimer({ isAccepted }) {
const { duration, setDuration } = useDuration();
const updatedTime = useRef({ ms: 0, s: 0, m: 0, h: 0 });
const timer = useRef(null)
const timer = useRef(null);
useEffect(() => {
if (isAccepted) {
runTimer(updatedTime, setDuration)
runTimer(updatedTime, setDuration);
timer.current = setInterval(() => {
runTimer(updatedTime, setDuration)
runTimer(updatedTime, setDuration);
}, 10);
} else {
clearInterval(timer.current);
timer.current = null;
}
return () => clearInterval(timer.current)
return () => clearInterval(timer.current);
}, [isAccepted, setDuration]);
if (!duration || !isAccepted) return null;
+4 -4
View File
@@ -3,14 +3,14 @@ import { atom } from 'recoil';
export const callerState = {
currentCall: atom({
key: 'currentCall',
default: null
default: null,
}),
callModal: atom({
key: 'callingModal',
default: false
default: false,
}),
callDuration: atom({
key: 'callDuration',
default: {ms: 0, s: 0, m: 0, h: 0}
})
default: { ms: 0, s: 0, m: 0, h: 0 },
}),
};
+2 -2
View File
@@ -8,5 +8,5 @@ interface ModalProps {
export const useCallModal = (): ModalProps => {
const [modal, setModal] = useRecoilState(callerState.callModal);
return { modal, setModal }
}
return { modal, setModal };
};
@@ -9,7 +9,7 @@ interface INotificationIcon {
export const NotificationIcon = ({ icon, to }: INotificationIcon) => {
return (
<IconButton component={NavLink} to={to} size="small">
<IconButton component={NavLink} to={to} size='small'>
{icon}
</IconButton>
);
+1 -1
View File
@@ -14,7 +14,7 @@ interface IUsePhone {
export const usePhone = (): IUsePhone => {
const isPhoneOpen = useRecoilValue(phoneState.visibility);
const { removeAlerts } = useNotifications();
const closePhone = () => {
+2 -2
View File
@@ -8,8 +8,8 @@ const useStyles = makeStyles({
},
msg: {
maxWidth: '300px',
wordWrap: 'break-word',
fontSize: '1em'
wordWrap: 'break-word',
fontSize: '1em',
},
});
+6 -3
View File
@@ -28,7 +28,7 @@ interface IContextMenuOption {
selected?: boolean;
icon?: React.ReactNode;
key?: string;
};
}
interface IContextMenuProps {
open: boolean;
@@ -64,8 +64,11 @@ export const ContextMenu = ({ open, onClose, options }: IContextMenuProps) => {
onClose();
}}
>
{option.icon && <ListItemIcon >{option.icon}</ListItemIcon>}
<ListItemText primary={option.label} secondary={option.description} />
{option.icon && <ListItemIcon>{option.icon}</ListItemIcon>}
<ListItemText
primary={option.label}
secondary={option.description}
/>
</ListItem>
))}
</List>
+2 -12
View File
@@ -3,23 +3,13 @@ import { AppIcon } from './AppIcon';
import { Box, Grid } from '@material-ui/core';
import { Link } from 'react-router-dom';
export const GridMenu = ({
items,
Component = AppIcon,
xs = undefined,
}) => {
export const GridMenu = ({ items, Component = AppIcon, xs = undefined }) => {
return (
<Grid container alignItems='center' direction='row'>
{items &&
items.length &&
items.map((item) => (
<Grid
item
xs={xs}
key={item.id}
alignItems='center'
justify='center'
>
<Grid item xs={xs} key={item.id} alignItems='center' justify='center'>
<Box textAlign='center'>
<Link to={item.path}>
<Component {...item} />
@@ -2,15 +2,15 @@ import React from 'react';
import { makeStyles } from '@material-ui/core';
interface IProps {
src: string,
alt: string
src: string;
alt: string;
}
const useStyles = makeStyles({
root: {
width: '100%',
objectFit: 'contain'
}
objectFit: 'contain',
},
});
export const PictureResponsive = ({ src, alt }: IProps) => {
+3 -3
View File
@@ -6,9 +6,9 @@ interface IStyleProps {
}
interface IProps {
src: string,
alt: string,
size?: string
src: string;
alt: string;
size?: string;
}
const useStyles = makeStyles<Theme, IStyleProps>({
+7 -1
View File
@@ -56,5 +56,11 @@ export const StatusIconButton = ({
...props
}: Omit<IconButtonProps, 'color'> & { color: StatusButtonStyleColor }) => {
const classes = useStyles({ color });
return <IconButton className={`${classes.root} ${className}`} size={size} {...props} />;
return (
<IconButton
className={`${classes.root} ${className}`}
size={size}
{...props}
/>
);
};
+3 -4
View File
@@ -1,15 +1,14 @@
import { useContext } from 'react';
import { SnackbarContext } from '../providers/SnackbarProvider';
export interface IAlert {
message: string;
type: 'success' | 'error' | 'info'
type: 'success' | 'error' | 'info';
}
interface ISnackBar {
addAlert: ({ message, type}: IAlert) => void;
addAlert: ({ message, type }: IAlert) => void;
alert: IAlert | null;
}
export const useSnackbar = (): ISnackBar => useContext(SnackbarContext);
export const useSnackbar = (): ISnackBar => useContext(SnackbarContext);
+1 -1
View File
@@ -12,4 +12,4 @@ export interface AppWrapperTypes {
children?: JSX.Element | JSX.Element[];
style?: CSSProperties;
handleClickAway?: (...args: any[]) => void;
}
}