import { ContentLayout } from "../../Components/ContentLayout"; import { EmbeddableControl, NLView } from "../../types"; import { Input, Row } from "antd"; import { LogOut } from "../../Components/Icons/LogOut"; import { RowCheckbox } from "../../Components/RowCheckbox"; import { SocialMediaInputs } from "../../Components/Input/SocialMediaInputs"; import { UserUpdateRequest } from "@newstackdev/iosdk-newgraph-client-js"; import { useActions, useAppState, useEffects } from "../../overmind"; import { useEffect } from "react"; import { useForm } from "antd/lib/form/Form"; import Form from "antd/lib/form"; import UserUpdateHeader from "./UserUpdateHeader"; import UserUpdateInfo from "./UserUpdateInfo"; import omit from "lodash/omit"; export const UserUpdate: NLView = ({ // hideUsername, // noRouing, embedded, setNext, }) => { const state = useAppState(); const actions = useActions(); const effects = useEffects(); const [form] = useForm(); useEffect(() => { const url = new URLSearchParams(window.location.search); if (url.get("status") === "error") { effects.ux.message.error(url.get("message")); } actions.api.user.getCurrent(); }, []); const onFinish = async (values: UserUpdateRequest & { file: any }) => { await actions.api.user.update({ user: omit(values, "file"), file: values.file?.fileList[0], }); actions.routing.historyPush({ location: "/my/profile" }); }; const onFinishFailed = (errorInfo: any) => { console.log("Failed:", errorInfo); effects.ux.message.error(JSON.stringify(errorInfo)); }; const sf = state.api.auth.user || {}; return (
} info={} isPost>

My links

{/* */}

I agree to receive relevant communication

I would like to take part in the test group

actions.auth.logout()} className="cursor-pointer"> Sign Out
); }; // function logout() { // throw new Error("Function not implemented."); // }