Skip to content

Commit

Permalink
refactor: resolve more advice by bot
Browse files Browse the repository at this point in the history
  • Loading branch information
tcsola authored and tcsola committed Sep 26, 2024
1 parent cb64e9d commit 8b21cd5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
9 changes: 2 additions & 7 deletions web/src/beta/features/AccountAndWorkSpaceSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@ const AccountAndWorkSpaceSetting: FC<Props> = ({ tab }) => {

return (
<Wrapper>
<Navbar
// projectId={projectId}
workspaceId={meData.myTeam?.id}
// sceneId={sceneId}
page="settings"
/>
<Navbar workspaceId={meData.myTeam?.id} page="settings" />
<MainSection>
<LeftSidePanel>
<SidebarWrapper>
Expand All @@ -72,7 +67,7 @@ const AccountAndWorkSpaceSetting: FC<Props> = ({ tab }) => {
<AccountSetting
onUpdateUserPassword={handleUpdateUserPassword}
passwordPolicy={passwordPolicy}
imformationData={{ name, email }}
informationData={{ name, email }}
/>
)}
</Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,7 @@ export type PasswordPolicy = {
};

type Props = {
className?: string;
project?: {
id: string;
name: string;
isArchived: boolean;
};
workspace?: {
id: string;
name: string;
};
isVisible: boolean;
archiveProject?: (archived: boolean) => void;
onClose?: () => void;
passwordPolicy?: PasswordPolicy;
updatePassword?: ({
Expand Down Expand Up @@ -85,7 +74,7 @@ const PasswordModal: React.FC<Props> = ({
break;
}
},
[t, password] // eslint-disable-line react-hooks/exhaustive-deps
[t, password, passwordPolicy] // eslint-disable-line react-hooks/exhaustive-deps
);

const handleClose = useCallback(() => {
Expand Down Expand Up @@ -171,7 +160,7 @@ const PasswordModal: React.FC<Props> = ({
<span>
<Icon icon="warning" size="large" color="red" />
</span>
"repeatPassword" Passwords need to match.
{t('"repeatPassword" Passwords need to match')}
</PasswordMessage>
) : undefined}
</PasswordField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { InnerPage, SettingsWrapper, SettingsFields } from "../common";
import PasswordModal from "./PasswordModal";

type Props = {
imformationData: { name?: string; email?: string };
passwordPolicy: PasswordPolicy;
informationData: { name?: string; email?: string };
passwordPolicy?: PasswordPolicy;
onUpdateUserPassword: ({
password,
passwordConfirmation
Expand All @@ -27,7 +27,7 @@ type Props = {
const AccountSetting: FC<Props> = ({
passwordPolicy,
onUpdateUserPassword,
imformationData
informationData
}) => {
const t = useT();
const [onPasswordModalClose, setPasswordModalOnClose] =
Expand All @@ -40,13 +40,13 @@ const AccountSetting: FC<Props> = ({
<SettingsFields>
<InputField
title={t("Name")}
value={imformationData.name ? t(imformationData.name) : ""}
value={informationData.name ? t(informationData.name) : ""}
appearance="readonly"
disabled
/>
<InputField
title={t("Email address")}
value={imformationData.email ? t(imformationData.email) : ""}
value={informationData.email ? t(informationData.email) : ""}
appearance="readonly"
disabled
/>
Expand Down

0 comments on commit 8b21cd5

Please sign in to comment.