mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-10 04:40:46 -05:00
can't edit builds if not owner user
This commit is contained in:
parent
c1805cf259
commit
37d4c5aeda
|
|
@ -31,6 +31,8 @@ interface Props {
|
|||
peakXPowers: Partial<Record<RankedMode, number>>;
|
||||
}
|
||||
|
||||
// TODO: when fallback in production seems like the site will never load till F5
|
||||
|
||||
const ProfilePage = (props: Props) => {
|
||||
const [showProfileModal, setShowProfileModal] = useState(false);
|
||||
const [buildToEdit, setBuildToEdit] = useState<boolean | Build>(false);
|
||||
|
|
@ -123,7 +125,11 @@ const ProfilePage = (props: Props) => {
|
|||
build={build}
|
||||
m={2}
|
||||
showWeapon
|
||||
onEdit={(build) => setBuildToEdit(build)}
|
||||
onEdit={
|
||||
loggedInUser?.id === user.id
|
||||
? (build) => setBuildToEdit(build)
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</MyInfiniteScroller>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user