diff --git a/src/components/comments/UpdateComment.tsx b/src/components/comments/UpdateComment.tsx index 5efa26112..db646d94e 100644 --- a/src/components/comments/UpdateComment.tsx +++ b/src/components/comments/UpdateComment.tsx @@ -54,6 +54,7 @@ export const EditComment: FC = ({ disabled, json, ipfs, + loading, setIpfsCid, onClick, onFailed, @@ -63,6 +64,7 @@ export const EditComment: FC = ({ type='primary' label='Update' disabled={disabled} + loading={loading} params={() => getTxParams({ json: json, diff --git a/src/components/profile-selector/MyAccountMenu.tsx b/src/components/profile-selector/MyAccountMenu.tsx index ad77d1021..486a61032 100644 --- a/src/components/profile-selector/MyAccountMenu.tsx +++ b/src/components/profile-selector/MyAccountMenu.tsx @@ -1,3 +1,4 @@ +import { useRouter } from 'next/router' import React, { createContext, FC, useContext, useEffect, useRef, useState } from 'react' import { getCurrentUrlOrigin } from 'src/utils/url' import { InfoDetails } from '../profiles/address-views' @@ -78,6 +79,7 @@ function parseMessage(data: string) { export const AccountMenu: React.FunctionComponent = ({ address, owner }) => { const iframeRef = useRef(null) const [isOpenProfileModal, setIsOpenProfileModal] = useState(false) + const router = useRouter() useEffect(() => { window.onmessage = event => { @@ -87,7 +89,9 @@ export const AccountMenu: React.FunctionComponent = ({ address, ow const { name, value } = message if (name === 'profile' && value === 'close') { setIsOpenProfileModal(false) - } else if (name === 'redirect' || name === 'redirect-hard') { + } else if (name === 'redirect') { + router.push(value) + } else if (name === 'redirect-hard') { // Using router push for redirect don't redirect properly, it just have loading for a bit and changes the url much later window.location.href = value setIsOpenProfileModal(false)