|
|
|
@ -12,11 +12,8 @@ const SolutionList = ({ user }: { user: User }) => {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div class="solution-list">
|
|
|
|
|
{solutions.map(({ forProblem, content, status }) => (
|
|
|
|
|
<Solution
|
|
|
|
|
{...{ forProblem, content, status }}
|
|
|
|
|
adminControls={isAdministrator(user.role)}
|
|
|
|
|
/>
|
|
|
|
|
{solutions.map(solution => (
|
|
|
|
|
<Solution {...solution} adminControls={isAdministrator(user.role)} />
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
@ -38,10 +35,10 @@ export const ProfilePage = ({}) => {
|
|
|
|
|
user && (
|
|
|
|
|
<main class="page-profile">
|
|
|
|
|
<Header {...{ user }} />
|
|
|
|
|
<div class="subtitle">Profilo</div>
|
|
|
|
|
<button onClick={handleLogout}>Logout</button>
|
|
|
|
|
<div class="subtitle">Le tue soluzioni</div>
|
|
|
|
|
<SolutionList {...{ user }} />
|
|
|
|
|
<div class="subtitle">Altro</div>
|
|
|
|
|
<button onClick={handleLogout}>Logout</button>
|
|
|
|
|
</main>
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|