Skip to content

Commit ee4125c

Browse files
committed
レビュー修正
1 parent f3076a6 commit ee4125c

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

server/src/seeds/seed-test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ import {
1111
async function main() {
1212
await Promise.all(
1313
subjects.map(async ({ group, subjects }) => {
14-
for (const [id, name] of subjects) {
15-
await prisma.interestSubject.upsert({
16-
where: { id },
17-
update: { name, group },
18-
create: { id, name, group },
14+
for (const [name] of subjects) {
15+
await prisma.interestSubject.create({
16+
data: {
17+
name,
18+
group,
19+
},
1920
});
2021
}
2122
}),

server/src/seeds/test-data/data.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ import type { Day } from "common/types";
22

33
export const subjects: Array<{
44
group: string;
5-
subjects: Array<[number, string]>;
5+
subjects: Array<[string]>;
66
}> = [
77
{
88
group: "Computer Science",
99
subjects: [
10-
[1, "型システム"],
11-
[2, "機械学習"],
12-
[3, "CPU アーキテクチャ"],
13-
[4, "分散処理"],
10+
["型システム"],
11+
["機械学習"],
12+
["CPU アーキテクチャ"],
13+
["分散処理"],
1414
] as const,
1515
},
1616
{
1717
group: "Math",
18-
subjects: [[5, "Lean4"]],
18+
subjects: [["Lean4"]],
1919
},
2020
];
2121
export const interest = [

web/app/edit/interests/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ export default function EditInterest() {
6666
function handleBack() {
6767
// TODO: 差分がないときは確認なしで戻る
6868
showAlert({
69-
AlertMessage: "編集中のフィールド、もしくはエラーがあります。",
70-
subAlertMessage: "本当にページを移動しますか?変更は破棄されます",
69+
AlertMessage: "変更がある場合は、破棄されます。",
70+
subAlertMessage: "本当にページを移動しますか?",
7171
yesMessage: "移動",
7272
clickYes: () => {
7373
router.push("/settings/profile");
@@ -219,6 +219,7 @@ export default function EditInterest() {
219219
await createSubject(newSubjectName);
220220
setIsOpen(false);
221221
getSubjects();
222+
setNewSubjectName("");
222223
}}
223224
>
224225
作成

0 commit comments

Comments
 (0)