Conversation
JohanHjelsethStorstad
left a comment
There was a problem hiding this comment.
Good work. I think this form can be added together with the rest of the 'general user settings'.
There is also a random projectNext file added.... maybe rebase if the file is large
| @@ -0,0 +1,21 @@ | |||
| 'use client' | |||
| import { updateUserAction } from '@/services/users/actions' | |||
| import Form from '@/app/_components/Form/Form' | |||
| @@ -0,0 +1,21 @@ | |||
| 'use client' | |||
There was a problem hiding this comment.
This file should be uppercased and have he same name as the function it exports
| export default function RegisterKioleskapLeaderboard({ | ||
| userId, | ||
| kioleskapLead, | ||
| }: { |
There was a problem hiding this comment.
use PropTypes semantics
There was a problem hiding this comment.
I also think (if this is a separate form) that the form name should include the word consent
| memberships Membership[] | ||
| credentials Credentials? | ||
| feideAccount FeideAccount? | ||
| kioleskapLead Boolean @default(false) |
There was a problem hiding this comment.
I think this field name is non-descriptive. It should at least include the word consent. Also: avoid abbreviating the name.
| <h2>Generelle Instillinger</h2> | ||
| <Image width={300} image={profile.user.image} /> | ||
|
|
||
| <RegisterKioleskapLeaderboard userId={profile.user.id} kioleskapLead={profile.user.kioleskapLead} /> |
There was a problem hiding this comment.
Since this form anyways just calls the updateUserAction the form should probably be for all updateable user fields and not its own form. I.e. all fields updateable through updateUser should be in the same form
| @@ -1,3 +1,5 @@ | |||
| import RegisterKioleskapLeaderboard from './kioleskapLeaderboard' | |||
|
|
|||
being shown in the Kioleskap Leaderboard.
fix: #439