-
Notifications
You must be signed in to change notification settings - Fork 209
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
Fix/colors general #1556
Fix/colors general #1556
Changes from 48 commits
db86753
3ffcadc
7686b1e
07641a2
be144c5
3787f9c
dbd351b
d027407
8cf28fe
78340ce
059927c
b0aa5e6
6bb38c9
c0df164
3b1657c
74c598e
5fcc87d
46af783
9fb6db6
5eca39c
61aaa84
541a5b3
e235279
a6eb970
2ab6a57
921fb6e
5e9629e
d54272b
6cdac32
8fe200f
d09382b
b4ba9ef
59f60d2
53fcd5a
851ad48
8661e83
7d76aee
6864756
8404cee
ec94458
bc9d8f0
8048dae
f68e885
8021786
2070e24
239164e
6eedaa5
d92a477
f8b3847
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 |
---|---|---|
|
@@ -32,13 +32,16 @@ const Avatar = ({ src, small, sx }) => { | |
return ( | ||
<MuiAvatar | ||
alt={`${user?.firstName} ${user?.lastName}`} | ||
/* TODO What is the /static/images/avatar/2.jpg ?*/ | ||
src={src ? src : user?.avatarImage ? image : "/static/images/avatar/2.jpg"} | ||
sx={{ | ||
Comment on lines
+35
to
37
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. 💡 Codebase verification Yo dawg, that fallback image is MIA! 🍝 The static image path
🔗 Analysis chainYo, what's the deal with this static image path? 🤔 That TODO comment's spittin' facts - we need to understand what Let's check if this image actually exists: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for references to static avatar images
rg -l "/static/images/avatar"
Length of output: 125 Script: #!/bin/bash
# Check the implementation in ProfilePanel.jsx
rg -A 5 -B 5 "/static/images/avatar" Client/src/Components/TabPanels/Account/ProfilePanel.jsx
# Look for potential config files
fd -e js -e json -e jsx config
Length of output: 404 Script: #!/bin/bash
# Check vite configuration
cat Client/vite.config.js
# Also check if the image exists in the static directory
fd -g "*.jpg" -g "*.png" static
Length of output: 495 |
||
fontSize: small ? "16px" : "22px", | ||
color: "white", | ||
fontWeight: 400, | ||
backgroundColor: theme.palette.primary.main, // Same BG color as checkmate BG in sidebar | ||
color: theme.palette.accent.contrastText, | ||
backgroundColor: theme.palette.accent.main, // Same BG color as checkmate BG in sidebar | ||
display: "inline-flex", | ||
/* | ||
TODO not sure what this is for*/ | ||
"&::before": { | ||
content: `""`, | ||
position: "absolute", | ||
|
@@ -54,7 +57,7 @@ const Avatar = ({ src, small, sx }) => { | |
}} | ||
> | ||
{user.firstName?.charAt(0)} | ||
{user.lastName?.charAt(0) || ''} | ||
{user.lastName?.charAt(0) || ""} | ||
</MuiAvatar> | ||
); | ||
}; | ||
|
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.
🛠️ Refactor suggestion
Hold up, why we locked into secondary colors? 🤔
Using fixed
secondary
palette colors limits the component's flexibility. Consider: