Skip to content

Commit

Permalink
fix: pictureIdを消した変更に対応していない部分を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
testusuke committed Oct 7, 2024
1 parent c254271 commit 83bcd00
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions components/users/userEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import {HiCheck, HiTrash} from "react-icons/hi2";
import React, {useState} from "react";
import {Gender, User, userFactory} from "@/src/models/UserModel";
import { Class } from "@/src/models/ClassModel";
import {Class} from "@/src/models/ClassModel";
import {Role} from "@/src/models/RoleModel";
import {useRouter} from "next/navigation";

Expand All @@ -31,7 +31,6 @@ export default function UserEditor(props: UserEditorProps) {
name: props.user.name,
email: props.user.email,
gender: gender as Gender,
pictureId: props.user.pictureId,
classId: classId,
})

Expand All @@ -46,22 +45,9 @@ export default function UserEditor(props: UserEditorProps) {
return (
<>
<Stack mx={0} my={2} spacing={2} direction={"column"}>

<Stack
direction={"row"}
spacing={2}
alignItems={"center"}
>
<Avatar
alt={props.user.name}
src={props.user.pictureId ? `${process.env.NEXT_PUBLIC_API_URL}/images/${props.user.pictureId}/file`: undefined}
sx={{ width: 56, height: 56 }}
/>

<Typography>
{props.user.name}
</Typography>
</Stack>
<Typography>
{props.user.name}
</Typography>

<FormControl fullWidth>
<InputLabel id="gender-select-label">性別</InputLabel>
Expand Down

0 comments on commit 83bcd00

Please sign in to comment.