mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
more formatting
This commit is contained in:
1 parent
046447b0fb
commit
f552c1212c
157 files changed
+635
-1579
No files matched your search
@@ -19,12 +19,7 @@ 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>
|
||||
@@ -35,8 +30,8 @@ export const DialGrid = () => {
|
||||
const { add, removeOne, clear } = useContext(DialInputCtx);
|
||||
|
||||
return (
|
||||
<Box height='100%'>
|
||||
<Grid container justify='space-around'>
|
||||
<Box height="100%">
|
||||
<Grid container justify="space-around">
|
||||
<ButtonItem label={1} onClick={() => add(1)} />
|
||||
<ButtonItem label={2} onClick={() => add(2)} />
|
||||
<ButtonItem label={3} onClick={() => add(3)} />
|
||||
@@ -46,10 +41,10 @@ export const DialGrid = () => {
|
||||
<ButtonItem label={7} onClick={() => add(7)} />
|
||||
<ButtonItem label={8} onClick={() => add(8)} />
|
||||
<ButtonItem label={9} onClick={() => add(9)} />
|
||||
<ButtonItem label='*' onClick={clear} />
|
||||
<ButtonItem label="*" onClick={clear} />
|
||||
<ButtonItem label={0} onClick={() => add(0)} />
|
||||
<ButtonItem label='#' onClick={removeOne} />
|
||||
<ButtonItem label='-' onClick={() => add('-')} />
|
||||
<ButtonItem label="#" onClick={removeOne} />
|
||||
<ButtonItem label="-" onClick={() => add('-')} />
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
|
||||
@@ -22,13 +22,13 @@ export const DialerApp = () => {
|
||||
<AppTitle app={dialer} />
|
||||
<AppContent>
|
||||
<Switch>
|
||||
<Route path='/phone/dial'>
|
||||
<Route path="/phone/dial">
|
||||
<DialPage />
|
||||
</Route>
|
||||
<Route exact path='/phone'>
|
||||
<Route exact path="/phone">
|
||||
<DialerHistory calls={history} />
|
||||
</Route>
|
||||
<Route path='/phone/contacts' component={ContactList}></Route>
|
||||
<Route path="/phone/contacts" component={ContactList}></Route>
|
||||
</Switch>
|
||||
</AppContent>
|
||||
<DialerNavBar />
|
||||
|
||||
@@ -45,18 +45,15 @@ export const DialerInput = () => {
|
||||
return (
|
||||
<Box component={Paper} className={classes.root}>
|
||||
<InputBase
|
||||
placeholder='Enter a number'
|
||||
placeholder="Enter a number"
|
||||
className={classes.input}
|
||||
value={inputVal}
|
||||
/>
|
||||
<IconButton color='primary' className={classes.iconBtn}>
|
||||
<PhoneIcon fontSize='large' onClick={() => handleCall(inputVal)} />
|
||||
<IconButton color="primary" className={classes.iconBtn}>
|
||||
<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>
|
||||
);
|
||||
|
||||
@@ -33,27 +33,27 @@ const DialerNavBar = () => {
|
||||
className={classes.root}
|
||||
>
|
||||
<BottomNavigationAction
|
||||
label='History'
|
||||
value='/phone'
|
||||
label="History"
|
||||
value="/phone"
|
||||
component={NavLink}
|
||||
icon={<HistoryIcon />}
|
||||
to='/phone'
|
||||
to="/phone"
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label='Dial'
|
||||
value='/phone/dial'
|
||||
color='secondary'
|
||||
label="Dial"
|
||||
value="/phone/dial"
|
||||
color="secondary"
|
||||
component={NavLink}
|
||||
icon={<PhoneIcon />}
|
||||
to='/phone/dial'
|
||||
to="/phone/dial"
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label='Contacts'
|
||||
value='/phone/contacts'
|
||||
color='secondary'
|
||||
label="Contacts"
|
||||
value="/phone/contacts"
|
||||
color="secondary"
|
||||
component={NavLink}
|
||||
icon={<PersonIcon />}
|
||||
to='/phone/contacts'
|
||||
to="/phone/contacts"
|
||||
/>
|
||||
</BottomNavigation>
|
||||
);
|
||||
|
||||
@@ -42,15 +42,10 @@ export const DialerHistory = ({ calls }) => {
|
||||
|
||||
if (!calls?.length) {
|
||||
return (
|
||||
<Box
|
||||
display='flex'
|
||||
justifyContent='center'
|
||||
alignItems='center'
|
||||
paddingTop={35}
|
||||
>
|
||||
<Box display="flex" justifyContent="center" alignItems="center" paddingTop={35}>
|
||||
<p>
|
||||
You got no friends!
|
||||
<span role='img' aria-label='deal with it'>
|
||||
<span role="img" aria-label="deal with it">
|
||||
😎
|
||||
</span>
|
||||
</p>
|
||||
@@ -79,7 +74,7 @@ export const DialerHistory = ({ calls }) => {
|
||||
<IconButton
|
||||
onClick={() =>
|
||||
history.push(
|
||||
`/contacts/-1?addNumber=${call.transmitter}&referal=/phone/contacts`
|
||||
`/contacts/-1?addNumber=${call.transmitter}&referal=/phone/contacts`,
|
||||
)
|
||||
}
|
||||
>
|
||||
@@ -105,7 +100,7 @@ export const DialerHistory = ({ calls }) => {
|
||||
<IconButton
|
||||
onClick={() =>
|
||||
history.push(
|
||||
`/contacts/-1?addNumber=${call.transmitter}&referal=/phone/contacts`
|
||||
`/contacts/-1?addNumber=${call.transmitter}&referal=/phone/contacts`,
|
||||
)
|
||||
}
|
||||
>
|
||||
@@ -113,7 +108,7 @@ export const DialerHistory = ({ calls }) => {
|
||||
</IconButton>
|
||||
) : null}
|
||||
</ListItem>
|
||||
)
|
||||
),
|
||||
)}
|
||||
</List>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user