From 2e53beea71d23aa2d004167978910f9d83339df9 Mon Sep 17 00:00:00 2001 From: Adnan Date: Sun, 15 Oct 2023 20:12:32 +0300 Subject: [PATCH] posts images will now open bigger after clickin them --- .../app/src/components/EditProfile/index.tsx | 1 + packages/app/src/components/Image/index.tsx | 48 +++++++++++++++++-- packages/app/src/components/Posts/index.tsx | 4 +- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/packages/app/src/components/EditProfile/index.tsx b/packages/app/src/components/EditProfile/index.tsx index e9fa123..d7c7c66 100644 --- a/packages/app/src/components/EditProfile/index.tsx +++ b/packages/app/src/components/EditProfile/index.tsx @@ -149,6 +149,7 @@ function EditProfile() { type="date" value={birthdate} onChange={(e) => setBirthdate(e.target.value)} + max={new Date().toISOString().split("T")[0]} > = ({ src }) => { + const [isImagePopupOpen, setImagePopupOpen] = useState(false); + + const openImagePopup = () => { + setImagePopupOpen(true); + }; + + const closeImagePopup = () => { + setImagePopupOpen(false); + }; + return ( - - - + <> + + + + + {isImagePopupOpen && ( + + + + + + )} + ); }; diff --git a/packages/app/src/components/Posts/index.tsx b/packages/app/src/components/Posts/index.tsx index b326f7d..f3da530 100644 --- a/packages/app/src/components/Posts/index.tsx +++ b/packages/app/src/components/Posts/index.tsx @@ -82,7 +82,9 @@ const Post: FC = ({ post }) => {

{post.user.username}

-

Favourite: {post.user.favouriteFishingStyle}

+ {post.user.favouriteFishingStyle && ( +

Favourite: {post.user.favouriteFishingStyle}

+ )}