Skip to content

Commit

Permalink
Update Footer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceCorwin committed Jun 8, 2022
1 parent 8ff9fd6 commit 4e77c99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/iList/Footer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Flex, Text } from '@chakra-ui/react';
import checkbox3 from '../../images/checkbox3.png';
const Footer = ({ user, bg, color, length }) => {
const str = user.email;
const nameParts = str.split('@');
const emailName = nameParts.length == 2 ? nameParts[0] : null;
return (
// <Flex
// bg={bg}
Expand All @@ -19,11 +22,11 @@ const Footer = ({ user, bg, color, length }) => {
<p className="d-i"> iLIST</p>
</div>
<p>
{length} list {length === 1 ? 'item' : 'items'}
{length} {length === 1 ? 'item' : 'items'}
</p>

<Text align="end" w="250px" isTruncated>
{user.email ? user.email : 'Demo Mode'}
{user.email ? emailName : 'Demo Mode'}
</Text>
</div>
// </Flex>
Expand Down

0 comments on commit 4e77c99

Please sign in to comment.