hide the create collection button if the user is visiting another user's page.

This commit is contained in:
2025-07-31 16:29:50 +08:00
parent f762e74e4d
commit 4eede5e76a

View File

@@ -412,7 +412,7 @@ function Collections({ username }: { username?: string }) {
onChange={(e) => delayedSetSearchKeyword(e.target.value)}
/>
<span className="flex-1" />
<button
{username == app.user?.username && <button
className="btn btn-primary btn-soft"
onClick={() => {
navigate("/create-collection");
@@ -420,7 +420,7 @@ function Collections({ username }: { username?: string }) {
>
<MdOutlineAdd size={20} className="inline-block mr-1" />
{t("Create")}
</button>
</button>}
</div>
<CollectionsList
username={username}