-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b8de48b
commit 88a0726
Showing
3 changed files
with
48 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import SettingsRemoteIcon from '@mui/icons-material/SettingsRemote'; | ||
import { Box, Button, Typography } from '@mui/material'; | ||
import { Link as RouterLink } from 'react-router-dom'; | ||
import { useChannels } from '../../hooks/useChannels'; | ||
import PaddedPaper from '../base/PaddedPaper'; | ||
|
||
export default function NoChannelsCreated() { | ||
const { isFetching: channelsFetching, data: channels } = useChannels(); | ||
|
||
return ( | ||
channels && | ||
channels.length === 0 && | ||
!channelsFetching && ( | ||
<PaddedPaper | ||
sx={{ | ||
display: 'flex', | ||
justifyContent: 'center', | ||
py: 10, | ||
textAlign: 'center', | ||
}} | ||
> | ||
<Box> | ||
<SettingsRemoteIcon fontSize="large" /> | ||
<Typography variant="h5"> | ||
You haven't created any channels yet. | ||
</Typography> | ||
<Button | ||
variant="contained" | ||
sx={{ | ||
my: 2, | ||
maxWidth: 350, | ||
textAlign: 'center', | ||
}} | ||
component={RouterLink} | ||
to="/channels/new" | ||
> | ||
Create your First Channel Now! | ||
</Button> | ||
</Box> | ||
</PaddedPaper> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters