Skip to content

Commit e4bd416

Browse files
committed
feat: hide delete on non-user posts
1 parent ab769c8 commit e4bd416

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/components/PostContainer.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ const PostContainer: React.FC<ContainerProps> = (props: ContainerProps) => {
6262
<IonItem className="item">
6363
<IonLabel>Share</IonLabel> <IonIcon className="stickRight" icon={share}></IonIcon>
6464
</IonItem>
65-
<IonItem onClick={() => handleDelete()}>
66-
<IonLabel>Delete</IonLabel> <IonIcon className="stickRight" icon={trash}></IonIcon>
67-
</IonItem>
65+
{user?.uid == props.postData.uid && (
66+
<IonItem onClick={() => handleDelete()}>
67+
<IonLabel>Delete</IonLabel> <IonIcon className="stickRight" icon={trash}></IonIcon>
68+
</IonItem>
69+
)}
6870
</IonList>
6971
</IonPopover>
7072
<IonIcon

0 commit comments

Comments
 (0)