Skip to content

Commit

Permalink
Merge pull request #318 from AppQuality/profile-modal-notifications
Browse files Browse the repository at this point in the history
fixed title translation
  • Loading branch information
marcbon authored Feb 22, 2024
2 parents 8345e4f + 95bd57a commit d1883ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/stories/profile-modal/_types.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InputHTMLAttributes, LiHTMLAttributes } from "react";
import { LiHTMLAttributes } from "react";
import { NextItemArgs } from "../dropdowns/menu/_types";
import { ModalArgs } from "../modals/_types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const StyledButton = styled(Button)`
font-weight: ${(props) => props.theme.fontWeights.semibold};
padding-left: 0;
justify-content: flex-start;
border-radius: 0;
`;

export const PreviousButton = (props: ButtonArgs) => (
Expand Down
10 changes: 5 additions & 5 deletions src/stories/profile-modal/items/settingsMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const SettingsItem = (props: SettingsProps) => {
const content = (
<>
<PreviousButton onClick={() => props.setActive("")} isBasic>
{props.i18n?.settingsTitle ?? "Notifications Settings"}
{props.i18n?.settingsTitle}
</PreviousButton>
<Separator />
<StyledBody>
Expand All @@ -74,16 +74,16 @@ export const SettingsItem = (props: SettingsProps) => {
)}
<Field>
<TriggerTitle isBold>
{props.i18n?.settingsToggle?.title ?? "Allow notifications"}
{props.i18n?.settingsToggle?.title}
</TriggerTitle>
<Toggle
checked={value === 1}
onChange={() => onToggleSettings(value === 1 ? 0 : 1)}
>
<Label>
{value === 1
? props.i18n?.settingsToggle?.on ?? "Yes"
: props.i18n?.settingsToggle?.off ?? "No"}
? props.i18n?.settingsToggle?.on
: props.i18n?.settingsToggle?.off}
</Label>
</Toggle>
</Field>
Expand Down Expand Up @@ -111,7 +111,7 @@ export const SettingsItem = (props: SettingsProps) => {
setActive={props.setActive}
icon={<GearIcon color={theme.palette.blue[600]} />}
>
{props.title}
{props.i18n?.settingsTitle}
</MenuItem>
</>
);
Expand Down
4 changes: 3 additions & 1 deletion src/stories/profile-modal/userMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ export const UserMenu = (props: UserMenuArgs) => {
value={"settings"}
selectedItem={item}
setActive={(i) => toggleItem(i)}
title={props.i18n?.settingsTitle || "Notifications Settings"}
settingValue={props.settingValue}
title={props.i18n?.settingsTitle || "Notifications Settings"}
i18n={{
settingsTitle:
props.i18n?.settingsTitle || "Notifications Settings",
settingsIntroText: props.i18n?.settingsIntroText,
settingsOutroText: props.i18n?.settingsOutroText,
settingsToggle: props.i18n?.settingsToggle,
Expand Down

0 comments on commit d1883ee

Please sign in to comment.