mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-26 11:15:43 +03:00
Don't allow self to mention self lolol
This commit is contained in:
parent
a0d4d9e08c
commit
4f3d503a35
1 changed files with 3 additions and 1 deletions
|
@ -407,6 +407,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
|||
} = relationship || {};
|
||||
|
||||
const [currentInfo, setCurrentInfo] = useState(null);
|
||||
const [isSelf, setIsSelf] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (info) {
|
||||
|
@ -439,6 +440,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
|||
|
||||
if (currentAccount === currentID) {
|
||||
// It's myself!
|
||||
setIsSelf(true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -543,7 +545,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
|||
</button>
|
||||
}
|
||||
>
|
||||
{currentAuthenticated && (
|
||||
{currentAuthenticated && !isSelf && (
|
||||
<>
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
|
|
Loading…
Reference in a new issue