-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update profileCard.tsx #934
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -14,7 +14,7 @@ import xpIcon from "public/icons/xpBadge.svg"; | |||||||||||||||||||||||
import useCreationDate from "@hooks/useCreationDate"; | ||||||||||||||||||||||||
import shareSrc from "public/icons/share.svg"; | ||||||||||||||||||||||||
import theme from "@styles/theme"; | ||||||||||||||||||||||||
import EyeIcon from "../iconsComponents/icons/eyeIcon"; | ||||||||||||||||||||||||
import {EyeIcon,EyeIconSlashed } from "../iconsComponents/icons/eyeIcon"; | ||||||||||||||||||||||||
import ProfilIcon from "../iconsComponents/icons/profilIcon"; | ||||||||||||||||||||||||
import Link from "next/link"; | ||||||||||||||||||||||||
import SocialMediaActions from "../actions/socialmediaActions"; | ||||||||||||||||||||||||
|
@@ -133,21 +133,18 @@ const ProfileCard: FunctionComponent<ProfileCardProps> = ({ | |||||||||||||||||||||||
> | ||||||||||||||||||||||||
{identity.domain?.domain || "Unknown Domain"} | ||||||||||||||||||||||||
</Typography> | ||||||||||||||||||||||||
<div className={styles.address_div}> | ||||||||||||||||||||||||
<div className="flex items-center gap-2"> | ||||||||||||||||||||||||
<Typography | ||||||||||||||||||||||||
type={TEXT_TYPE.BODY_SMALL} | ||||||||||||||||||||||||
className={`${styles.wallet_amount} font-extrabold`} | ||||||||||||||||||||||||
> | ||||||||||||||||||||||||
{totalBalance !== null ? ( | ||||||||||||||||||||||||
`$${totalBalance.toFixed(2)}` | ||||||||||||||||||||||||
) : ( | ||||||||||||||||||||||||
<Skeleton variant="text" width={60} height={30} /> | ||||||||||||||||||||||||
)} | ||||||||||||||||||||||||
</Typography> | ||||||||||||||||||||||||
<EyeIcon /> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
<div className={styles.address_div}> | ||||||||||||||||||||||||
<div className="flex items-center gap-2"> | ||||||||||||||||||||||||
<Typography type={TEXT_TYPE.BODY_SMALL} className={`${styles.wallet_amount} font-extrabold`}> | ||||||||||||||||||||||||
{totalBalance !== null ? (hidePortfolio ? "******" : `$${totalBalance.toFixed(2)}`) : ( | ||||||||||||||||||||||||
<Skeleton variant="text" width={60} height={30} /> | ||||||||||||||||||||||||
)} | ||||||||||||||||||||||||
</Typography> | ||||||||||||||||||||||||
<div onClick={() => setHidePortfolio(!hidePortfolio)} className={styles.pointer}> | ||||||||||||||||||||||||
{hidePortfolio ? <EyeIconSlashed /> : <EyeIcon />} | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
Comment on lines
+143
to
+145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Improve accessibility for the toggle button. The div acting as a button lacks proper accessibility attributes. -<div onClick={() => setHidePortfolio(!hidePortfolio)} className={styles.pointer}>
+<button
+ onClick={() => setHidePortfolio(!hidePortfolio)}
+ className={styles.pointer}
+ aria-label={hidePortfolio ? "Show balance" : "Hide balance"}
+ type="button"
+>
{hidePortfolio ? <EyeIconSlashed /> : <EyeIcon />}
-</div>
+</button> 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
<div className="flex sm:hidden justify-center py-4"> | ||||||||||||||||||||||||
<SocialMediaActions identity={identity} /> | ||||||||||||||||||||||||
{tweetShareLink && ( | ||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
The pointer style needs to be added to the element.
The
styles.pointer
class is not defined in the importeddashboard.module.css
. You need to either:cursor: pointer
style directly to the element using inline styles.pointer
class in the CSS module withcursor: pointer
propertycursor: url(../public/icons/pointer-cursor.png), pointer
🔗 Analysis chain
Verify cursor pointer styles.
The PR objectives mention adding cursor pointer on hover, but the implementation relies on a CSS class that isn't visible in the provided code.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 180
Script:
Length of output: 3845
Script:
Length of output: 4947
Script:
Length of output: 120
Script:
Length of output: 7467