-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: profile component #282
base: main
Are you sure you want to change the base?
Changes from 4 commits
a4d8305
d96c1d5
cdbe251
2494348
9fefa4d
694b4eb
f1f3a49
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 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,54 @@ | ||||||||||||||||||
@props([ | ||||||||||||||||||
'user', | ||||||||||||||||||
'buttons', | ||||||||||||||||||
'stats' => [ | ||||||||||||||||||
'lists' => 0, | ||||||||||||||||||
'reviews' => 0, | ||||||||||||||||||
'friends' => 0, | ||||||||||||||||||
], | ||||||||||||||||||
]) | ||||||||||||||||||
|
||||||||||||||||||
<div class="relative flex w-full"> | ||||||||||||||||||
<div class="absolute top-0 right-0"> | ||||||||||||||||||
<x-lucide-ellipsis-vertical class="h-6 w-6 text-slate-50" /> | ||||||||||||||||||
dcbwe marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
</div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="mr-6 flex w-full flex-row flex-wrap items-center gap-4"> | ||||||||||||||||||
ell-ska marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
<div class="flex size-30 flex-none items-center justify-center"> | ||||||||||||||||||
@isset($user) | ||||||||||||||||||
<x-avatar :image="$user->image" size="lg" /> | ||||||||||||||||||
@else | ||||||||||||||||||
<x-avatar size="lg" /> | ||||||||||||||||||
@endisset | ||||||||||||||||||
</div> | ||||||||||||||||||
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. i don't think there needs to be a wrapping div for the avatar. there's also no need to check if there is a
Suggested change
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. Är wrapper onödig tar vi bort den. Check finns för att inte krasha i test 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. vilka test? denna komponent används bara på profilsidan och man kan inte gå in på en profil som inte existerar. då kommer man komma till 404 innan denna sida renderar 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. fixad |
||||||||||||||||||
|
||||||||||||||||||
<div class="flex grow flex-col gap-3 pr-10 text-slate-50"> | ||||||||||||||||||
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. why is 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. följer figmas design, kan tas bort 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. finns ingen padding på denna div i figma? |
||||||||||||||||||
<div class="text-lg font-bold"> | ||||||||||||||||||
@isset($user) | ||||||||||||||||||
{{ $user->username }} | ||||||||||||||||||
@else | ||||||||||||||||||
@username | ||||||||||||||||||
@endisset | ||||||||||||||||||
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.
Suggested change
same reason as above 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. samma som ovan, kan tas bort |
||||||||||||||||||
</div> | ||||||||||||||||||
<div class="flex flex-row gap-6 text-slate-50"> | ||||||||||||||||||
dcbwe marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
@foreach ($stats as $stat => $sum) | ||||||||||||||||||
<div class="flex flex-col"> | ||||||||||||||||||
<p class="text-sm font-bold"> | ||||||||||||||||||
{{ $sum }} | ||||||||||||||||||
</p> | ||||||||||||||||||
<span class="text-sm font-normal"> | ||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||
{{ $stat }} | ||||||||||||||||||
</span> | ||||||||||||||||||
</div> | ||||||||||||||||||
@endforeach | ||||||||||||||||||
</div> | ||||||||||||||||||
</div> | ||||||||||||||||||
|
||||||||||||||||||
<div class="flex flex-none flex-row gap-2 self-start"> | ||||||||||||||||||
ell-ska marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
@isset($buttons) | ||||||||||||||||||
{{ $buttons }} | ||||||||||||||||||
@endisset | ||||||||||||||||||
</div> | ||||||||||||||||||
</div> | ||||||||||||||||||
</div> |
ell-ska marked this conversation as resolved.
Show resolved
Hide resolved
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. again, please don't remove the layout 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. ? 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. du har raderat allt innehåll i denna fil. det ska vara där 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. den här filen finns det nu innehåll i i main. jag vet inte varför du inte får en merge konflikt men se till att du inte tar bort det som ligger i main innan denna mergas |
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.
i don't think you can pass html as a prop? and that this rather should be a named slot. but correct me if i'm wrong!
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.
absolut inte säker?
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.
om du har testat och det funkar så är det lugnt men vill veta att det funkar innan vi mergar detta