Make top right avatar into a drop down menu with the following two options: [profile, sign out] #81
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The same popover component from material ui that's used in
web/src/components/EmojiReaction/EmojiReaction.jscan be used for this.atm the button immediately signs the user out which is not intuitive, plus there's no easy way for a user to get to their profile so this helps with both
This avatar is located within:
web/src/layouts/MainLayout/MainLayout.jsto link to the user profile use
<Link to={routes.user2({userName: user.userName})}>...</Link>similar to what's used inweb/src/components/PartProfile/PartProfile.jsHey @Yash-R, I've assigned this one to you. I think it will be good because it's adding a bit of new functionality, and there's an example of something similar being used with the popover. Though another good issue might be #83. Let me know if you want to that instead or neither.
okay, I can do both let me do this one first is that okay @Irev-Dev
And please give me all the details for installing.
Great,
And yup thanks for the reminder, working on that now.
@Irev-Dev how long will it take?
Sorry @Yash-R took me a while because I was setting a database seed #85 . not the quickest way to get you up and running but good to have for future.
So you'll need to pull the latest main branch to get the changes I just made. Then you need to delete the sqlite db. it will be located at
api/prisma/dev.db, so just delete this file.Then run
sign into the app with
email: localUser1@kurthutten.com
password: abc123
and you should be good to go. Let me know if you have any problems.
thanks its working good now
@Irev-Dev how can i access userName i have tried all posiible solution but the only error i got is userName is not defined
@Yash-R,
UserName is:
local-user-1and 2http://localhost:8910/u/local-user-1
You can see the details of what seed data was added in
api/prisma/seeds.jsNot directly related, but the sqlite browser can be handy for directly checking what's in the db. https://sqlitebrowser.org/dl/ once installed use it to open

api/prisma/dev.db, just be aware that if you make changes to the data with sqlite brower this buttonwrite changesWill light up, and if you don't click it than it's like the sqlite browser takes control of the db and it can start blocking our code from doing writes and you'll start getting errors out of now where. Can be confusing unless you know the two can conflict.
Okay but I think there is some problem in useAuth because the new button is not working and current User is also not accessible.
The problem is how to access user data in main file.
Hmm, okay I'm not sure.


If I add a console log into MainLayout like so
Then I get an object like this in the console.
Does that work for you?
I don't know if signing out and back in might help 🤷
@Irev-Dev its looking like this do you want me to change anything?
@Yash-R Looks great. Really glad to see you've got some design chops. Even simple things like a decent amount of padding to text can breath is not something I take for granted. Only tweak I'm thinking of is it might be good to align the right edge of the avatar with the right edge of the popover, what do you think?
I think that would be:
In the materialUi popover.