Skip to content

Conversation

@Sherine7734
Copy link

being shown in the Kioleskap Leaderboard.

fix: #439

@Sherine7734 Sherine7734 marked this pull request as ready for review November 3, 2025 19:08
@Sherine7734 Sherine7734 requested review from JohanHjelsethStorstad and Paulijuz and removed request for Paulijuz November 3, 2025 19:09
@JohanHjelsethStorstad JohanHjelsethStorstad changed the title Added a checkbox based form to submit consent to Feat/Consent form fridge leaderboard Nov 3, 2025
Copy link
Member

@JohanHjelsethStorstad JohanHjelsethStorstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@/components

@@ -0,0 +1,21 @@
'use client'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be uppercased and have he same name as the function it exports

export default function RegisterKioleskapLeaderboard({
userId,
kioleskapLead,
}: {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use PropTypes semantics

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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} />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace

JohanHjelsethStorstad

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat/koileskap leaderboard

3 participants