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
|
{activityItem.actor_detail.first_name} Bot
|
||||||
</span>
|
</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">
|
<span className="text-gray font-medium">
|
||||||
{activityItem.actor_detail.display_name}
|
{activityItem.actor_detail.display_name}
|
||||||
</span>
|
</span>
|
||||||
|
@ -33,7 +33,7 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
|
|||||||
const [isPageLoading, setIsPageLoading] = useState(true);
|
const [isPageLoading, setIsPageLoading] = useState(true);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
appConfig: { envConfig },
|
user: { currentUser },
|
||||||
} = useMobxStore();
|
} = useMobxStore();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -74,20 +74,11 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!envConfig) return;
|
if (!currentUser) return;
|
||||||
|
|
||||||
const enableEmailPassword =
|
if (currentUser.is_password_autoset) router.push("/profile");
|
||||||
envConfig?.email_password_login ||
|
|
||||||
!(
|
|
||||||
envConfig?.email_password_login ||
|
|
||||||
envConfig?.magic_login ||
|
|
||||||
envConfig?.google_client_id ||
|
|
||||||
envConfig?.github_client_id
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!enableEmailPassword) router.push("/profile");
|
|
||||||
else setIsPageLoading(false);
|
else setIsPageLoading(false);
|
||||||
}, [envConfig, router]);
|
}, [currentUser, router]);
|
||||||
|
|
||||||
if (isPageLoading)
|
if (isPageLoading)
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user