diff --git a/src/pages/settings/panes/Profile.tsx b/src/pages/settings/panes/Profile.tsx index b13c97af..8112277b 100644 --- a/src/pages/settings/panes/Profile.tsx +++ b/src/pages/settings/panes/Profile.tsx @@ -1,5 +1,6 @@ import { Markdown } from "@styled-icons/boxicons-logos"; import { observer } from "mobx-react-lite"; +import { useHistory } from "react-router-dom"; import { Profile as ProfileI } from "revolt-api/types/Users"; import styles from "./Panes.module.scss"; @@ -21,11 +22,13 @@ import AutoComplete, { useAutoComplete, } from "../../../components/common/AutoComplete"; import Button from "../../../components/ui/Button"; +import Tip from "../../../components/ui/Tip"; export const Profile = observer(() => { const status = useContext(StatusContext); const translate = useTranslation(); const client = useClient(); + const history = useHistory(); const [profile, setProfile] = useState(undefined); @@ -49,6 +52,10 @@ export const Profile = observer(() => { if (!changed) setChanged(true); } + function switchPage(to: string) { + history.replace(`/settings/${to}`); + } + const { onChange, onKeyUp, @@ -193,6 +200,12 @@ export const Profile = observer(() => {

+ + Want to change your username?{" "} + switchPage("account")}> + Head over to your account settings. + + ); });