Skip to content

Commit

Permalink
fix: review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Aug 21, 2024
1 parent 7ad0531 commit 29cf33d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 43 deletions.
8 changes: 2 additions & 6 deletions src/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ const StyledIconButton = styled(IconButton)(
}),
);

const StyledToolbar = styled(Toolbar)({
// justifyContent: 'space-between',
});

type HeaderMenuIconProps = {
isOpen: boolean;
buttonId?: string;
Expand Down Expand Up @@ -121,7 +117,7 @@ export const Header = ({
...sx,
}}
>
<StyledToolbar disableGutters>
<Toolbar disableGutters>
{hasSidebar && (
<HeaderMenuIcon
isOpen={isSidebarOpen}
Expand All @@ -142,7 +138,7 @@ export const Header = ({
{centerContent}
{rightContent}
</Stack>
</StyledToolbar>
</Toolbar>
</AppBar>
<Toolbar />
</>
Expand Down
10 changes: 2 additions & 8 deletions src/itemLogin/ItemLoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ItemLoginSchemaType, UUID } from '@graasp/sdk';

import Button from '../buttons/Button/Button.js';
import ForbiddenText from './ForbiddenText.js';
import { isMemberIdValid } from './utils.js';

export type SignInPropertiesType = {
memberId?: string;
Expand Down Expand Up @@ -115,16 +114,12 @@ const ItemLoginScreen = ({
};

const shouldSignInBeDisabled = (): boolean => {
const usernameError = !username?.length || isMemberIdValid(username);
const usernameError = !username?.length;
const passwordError = withPassword && !password?.length;
return usernameError || passwordError;
};

const isMemberId = isMemberIdValid(username);
const error = Boolean(username?.length && isMemberId);
const helperText = isMemberId
? t('This is a member id. You should switch the sign in mode.')
: null;
const error = Boolean(username?.length);

return (
<WrapperContainer maxWidth='xs'>
Expand All @@ -138,7 +133,6 @@ const ItemLoginScreen = ({
variant='outlined'
fullWidth
type='text'
helperText={helperText}
id={usernameInputId}
value={username}
onKeyDown={handleUsernamePressEnter}
Expand Down
21 changes: 0 additions & 21 deletions src/itemLogin/utils.test.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/itemLogin/utils.ts

This file was deleted.

0 comments on commit 29cf33d

Please sign in to comment.