mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: profile setting bug fixes (#3068)
* chore: change password page redirection fix * chore: profile activity profile redirection fix
This commit is contained in:
parent
8041b23a63
commit
82c0ee00a3
@ -156,7 +156,9 @@ const ProfileActivityPage: NextPageWithLayout = () => {
|
||||
{activityItem.actor_detail.first_name} Bot
|
||||
</span>
|
||||
) : (
|
||||
<Link href={`/${workspaceSlug}/profile/${activityItem.actor_detail.id}`}>
|
||||
<Link
|
||||
href={`/${activityItem.workspace_detail.slug}/profile/${activityItem.actor_detail.id}`}
|
||||
>
|
||||
<span className="text-gray font-medium">
|
||||
{activityItem.actor_detail.display_name}
|
||||
</span>
|
||||
|
@ -33,7 +33,7 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
|
||||
const [isPageLoading, setIsPageLoading] = useState(true);
|
||||
|
||||
const {
|
||||
appConfig: { envConfig },
|
||||
user: { currentUser },
|
||||
} = useMobxStore();
|
||||
|
||||
const router = useRouter();
|
||||
@ -74,20 +74,11 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!envConfig) return;
|
||||
if (!currentUser) return;
|
||||
|
||||
const enableEmailPassword =
|
||||
envConfig?.email_password_login ||
|
||||
!(
|
||||
envConfig?.email_password_login ||
|
||||
envConfig?.magic_login ||
|
||||
envConfig?.google_client_id ||
|
||||
envConfig?.github_client_id
|
||||
);
|
||||
|
||||
if (!enableEmailPassword) router.push("/profile");
|
||||
if (currentUser.is_password_autoset) router.push("/profile");
|
||||
else setIsPageLoading(false);
|
||||
}, [envConfig, router]);
|
||||
}, [currentUser, router]);
|
||||
|
||||
if (isPageLoading)
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user