diff --git a/src/app/(auth)/log-in/[[...sign-in]]/page.tsx b/src/app/(auth)/log-in/[[...sign-in]]/page.tsx index bf5ba23..c12b517 100644 --- a/src/app/(auth)/log-in/[[...sign-in]]/page.tsx +++ b/src/app/(auth)/log-in/[[...sign-in]]/page.tsx @@ -17,9 +17,6 @@ export default function LogInPage() { signUpUrl="/sign-up" forceRedirectUrl="/pets" appearance={{ - layout: { - logoPlacement: "none", - }, variables: { colorPrimary: "#F97316", colorBackground: "#FAFAFA", diff --git a/src/app/(auth)/sign-up/[[...sign-up]]/page.tsx b/src/app/(auth)/sign-up/[[...sign-up]]/page.tsx index 6c2b357..3dff02d 100644 --- a/src/app/(auth)/sign-up/[[...sign-up]]/page.tsx +++ b/src/app/(auth)/sign-up/[[...sign-up]]/page.tsx @@ -17,9 +17,6 @@ export default function SignUpPage() { signInUrl="/log-in" forceRedirectUrl="/onboarding/pet" appearance={{ - layout: { - logoPlacement: "none", - }, variables: { colorPrimary: "#F97316", colorBackground: "#FAFAFA", diff --git a/src/components/feed/PostCard.tsx b/src/components/feed/PostCard.tsx index f52a3f3..0291bdf 100644 --- a/src/components/feed/PostCard.tsx +++ b/src/components/feed/PostCard.tsx @@ -335,7 +335,7 @@ export function PostCard({ post, onDeleted, variant = "feed" }: PostCardProps) { {currentCaption ))} @@ -372,7 +372,7 @@ export function PostCard({ post, onDeleted, variant = "feed" }: PostCardProps) { {currentCaption )} diff --git a/src/components/layout/MobileNav.tsx b/src/components/layout/MobileNav.tsx index 8b6923f..328662b 100644 --- a/src/components/layout/MobileNav.tsx +++ b/src/components/layout/MobileNav.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useState, useEffect } from "react"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { @@ -60,6 +60,12 @@ export function MobileNav({ pets }: MobileNavProps) { const activePet = pets.find((p) => p.id === activePetId) ?? pets[0]; const [postTypeSheetOpen, setPostTypeSheetOpen] = useState(false); + useEffect(() => { + if (!activePetId && pets.length > 0) { + setActivePet(pets[0].id); + } + }, [activePetId, pets, setActivePet]); + // D-05: Home → /feed; also highlight when on / (which redirects to /feed) const isHomePage = pathname === "/feed" || pathname === "/"; const isPetsPage = pathname.startsWith("/pets"); diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 3d4e199..95683b8 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useState, useEffect } from "react"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { @@ -79,6 +79,12 @@ export function Sidebar({ pets }: SidebarProps) { const activePet = pets.find((p) => p.id === activePetId) ?? pets[0]; const [postTypeSheetOpen, setPostTypeSheetOpen] = useState(false); + useEffect(() => { + if (!activePetId && pets.length > 0) { + setActivePet(pets[0].id); + } + }, [activePetId, pets, setActivePet]); + return (