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;
}