diff --git a/src/components/profile/AboutMe.tsx b/src/components/profile/AboutMe.tsx index 4c67013e..3b7a7530 100644 --- a/src/components/profile/AboutMe.tsx +++ b/src/components/profile/AboutMe.tsx @@ -14,60 +14,54 @@ const ProfileAboutMe = ({ aboutMe: string; isOwner: boolean; }) => { - const [isSheetOpen, setIsSheetOpen] = useState(false); + const [isSheetOpen, setIsSheetOpen] = useState(false); + const hasAboutMe = !!aboutMe?.trim(); - const title = - aboutMe.length === 0 - ? SHEETS.aboutMe.title - : SHEETS.aboutMe.title.replace('Add', 'Edit'); + // Improved title logic + const sheetTitle = hasAboutMe + ? SHEETS.aboutMe.title.replace('Add', 'Edit') + : SHEETS.aboutMe.title; - const handleClose = () => { - setIsSheetOpen(false); - }; - const handleOpen = () => { - setIsSheetOpen(true); - }; + const handleClose = () => setIsSheetOpen(false); + const handleOpen = () => setIsSheetOpen(true); return ( <> -
+

About Me

{isOwner && ( )}
- {!aboutMe && ( + + {!hasAboutMe ? ( - )} - {aboutMe && ( + ) : (
-

{aboutMe}

+

{aboutMe}

)} + {isOwner && ( @@ -77,4 +71,4 @@ const ProfileAboutMe = ({ ); }; -export default ProfileAboutMe; +export default ProfileAboutMe; \ No newline at end of file diff --git a/src/layouts/footer.tsx b/src/layouts/footer.tsx index eaf3f7af..ab36ce8a 100644 --- a/src/layouts/footer.tsx +++ b/src/layouts/footer.tsx @@ -4,31 +4,35 @@ import Link from 'next/link'; const Footer = () => { return ( -