Skip to content

Commit

Permalink
removed last login on closed drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshamoon committed Oct 11, 2023
1 parent 6cac406 commit 2feb659
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const SideDrawer = () => {
</div>
</div>
{drawer}
<LastLogin />
<LastLogin drawerOpen={drawerOpen} />
<WalletBalance fullOpen={drawerOpen} />
</Drawer>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/LastLogin/LastLogin.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
position: absolute;
bottom: 26px;
font-size: 12px;
padding-left: 10px;
padding-left: 22px;
color: #073f24;
font-weight: 500;
}
10 changes: 7 additions & 3 deletions src/containers/LastLogin/LastLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ import { DATE_TIME_FORMAT } from 'common/constants';

import styles from './LastLogin.module.css';

export const LastLogin = () => {
interface LastLoginProps {
drawerOpen: boolean;
}

export const LastLogin = ({ drawerOpen }: LastLoginProps) => {
const { t } = useTranslation();
const lastLogin = getAuthSession('last_login_time');
return (
return drawerOpen ? (
<div className={styles.lastLogin}>
{t('Last login')}: {moment(lastLogin).format(DATE_TIME_FORMAT)}
</div>
);
) : null;
};

0 comments on commit 2feb659

Please sign in to comment.