feat: add password reset email
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
import { Suspense, useEffect } from "react";
|
||||
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import {
|
||||
AtSign,
|
||||
Bookmark,
|
||||
@@ -102,13 +102,8 @@ export default function MeLayout({ children }: { children: React.ReactNode }) {
|
||||
|
||||
function ConditionalTabs({ tabs }: { tabs: ProfileTab[] }) {
|
||||
const searchParams = useSearchParams();
|
||||
const pathname = usePathname();
|
||||
// Hide tabs when the user is in a focused subview:
|
||||
// • /u/me?edit=1 — the inline profile-edit form
|
||||
// • /u/me/settings — the reading-prefs page
|
||||
// In either case the strip is visual noise that distracts from the
|
||||
// task they navigated in to do.
|
||||
// Hide tabs when the user is editing their profile inline — the strip
|
||||
// is visual noise that distracts from the task they navigated in to do.
|
||||
const editMode = searchParams.get("edit") === "1";
|
||||
const settingsMode = pathname.startsWith("/u/me/settings");
|
||||
return editMode || settingsMode ? null : <ProfileTabs tabs={tabs} />;
|
||||
return editMode ? null : <ProfileTabs tabs={tabs} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user