mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 05:07:46 +00:00
fix: save file not counting towards filter count and profiles showing wrong buttons
This commit is contained in:
parent
73222c266f
commit
48df28b285
2 changed files with 4 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ export default function FilterMenu() {
|
|||
const rawTags = searchParams.get("tags") || "";
|
||||
const rawExclude = searchParams.get("exclude") || "";
|
||||
const allowCopying = (searchParams.get("allowCopying") as unknown as boolean) || false;
|
||||
const isFromSaveFile = (searchParams.get("isFromSaveFile") as unknown as boolean) || false;
|
||||
|
||||
const tags = useMemo(
|
||||
() =>
|
||||
|
|
@ -66,9 +67,10 @@ export default function FilterMenu() {
|
|||
if (gender) count++;
|
||||
if (allowCopying) count++;
|
||||
if (makeup) count++;
|
||||
if (isFromSaveFile) count++;
|
||||
|
||||
setFilterCount(count);
|
||||
}, [tags, exclude, platform, gender, allowCopying, makeup]);
|
||||
}, [tags, exclude, platform, gender, allowCopying, makeup, isFromSaveFile]);
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export default function ProfileLayout() {
|
|||
|
||||
const isAdmin = userId === Number(import.meta.env.VITE_ADMIN_USER_ID);
|
||||
const isContributor = import.meta.env.VITE_CONTRIBUTORS_USER_IDS?.split(",").includes(String(user?.id));
|
||||
const isOwnProfile = userId === user?.id;
|
||||
const isOwnProfile = $session?.user?.id && userId === Number($session.user.id);
|
||||
|
||||
const joinDate = new Date(user.createdAt).toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
||||
const metaTitle = `${user.name} - TomodachiShare`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue