diff --git a/src/pages/MyAccount/components/Billing/components/Header/Header.module.scss b/src/pages/MyAccount/components/Billing/components/Header/Header.module.scss index 21247df7e5..2990c78277 100644 --- a/src/pages/MyAccount/components/Billing/components/Header/Header.module.scss +++ b/src/pages/MyAccount/components/Billing/components/Header/Header.module.scss @@ -30,7 +30,6 @@ font-weight: 500; font-size: 1rem; text-align: center; - color: $c-gray-100; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; diff --git a/src/pages/MyAccount/components/Profile/Profile.tsx b/src/pages/MyAccount/components/Profile/Profile.tsx index d0ffbcafb6..bbcd656758 100644 --- a/src/pages/MyAccount/components/Profile/Profile.tsx +++ b/src/pages/MyAccount/components/Profile/Profile.tsx @@ -3,9 +3,13 @@ import { useDispatch, useSelector } from "react-redux"; import { logOut } from "@/pages/Auth/store/actions"; import { selectUser } from "@/pages/Auth/store/selectors"; import { ButtonIcon, Loader } from "@/shared/components"; +import { Theme } from "@/shared/constants"; import { useRoutesContext } from "@/shared/contexts"; import { useIsTabletView } from "@/shared/hooks/viewport"; import { Edit3Icon as EditIcon, LogoutIcon } from "@/shared/icons"; +import ThemeIcon from "@/shared/icons/theme.icon"; +import { changeTheme } from "@/shared/store/actions"; +import { selectTheme } from "@/shared/store/selectors"; import { Button, ButtonVariant } from "@/shared/ui-kit"; import { Header, MenuButton, UserDetails, UserDetailsRef } from "./components"; import styles from "./Profile.module.scss"; @@ -23,6 +27,7 @@ const Profile: FC = (props) => { const [isSubmitting, setIsSubmitting] = useState(false); const user = useSelector(selectUser()); const isMobileView = useIsTabletView(); + const theme = useSelector(selectTheme); const handleEditingChange = (isEditing: boolean) => { setIsEditing(isEditing); @@ -49,6 +54,10 @@ const Profile: FC = (props) => { userDetailsRef.current?.submit(); }; + const handleThemeToggle = () => { + dispatch(changeTheme(theme === Theme.Dark ? Theme.Light : Theme.Dark)); + }; + const handleLogout = () => { dispatch(logOut()); }; @@ -116,6 +125,12 @@ const Profile: FC = (props) => { text="Billing" to={getBillingPagePath()} /> + } + />