Skip to content

Commit

Permalink
お題変わったら変換
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubosaka committed Nov 13, 2024
1 parent ef6fc4d commit 895f4d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions app/src/app/camera/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,21 @@ const CameraApp = () => {
}
return assignment;
});
const notAnsweredAssignment = newAssignments.find(
(assignment: todayAssignment) => !assignment.isAnswered,
);

setTodayAssignment(notAnsweredAssignment);

setIsUploading(false);
toast(message);
setAssignments(newAssignments);

if (newAssignments.every((assignment) => assignment.isAnswered)) {
setIsActive(false);
}
const notAnsweredAssignment = newAssignments.find(
(assignment: todayAssignment) => !assignment.isAnswered,
);
setTodayAssignment(notAnsweredAssignment);


} catch (error) {
setIsUploading(false);
console.error("アップロード中にエラーが発生しました:", error);
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/AssignmentBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const AssignmentBadge = ({
return (
<div className="flex flex-col items-center justify-center text-center fixed top-0 left-0 w-full h-1/4">
<div className="py-2 px-4 bg-orange-500 text-white rounded-full">
<Select defaultValue={assignment.english} onValueChange={handleSelect}>
<Select value={assignment.english} onValueChange={handleSelect}>
<SelectTrigger className="w-[180px]">
<SelectValue />
</SelectTrigger>
Expand Down

0 comments on commit 895f4d9

Please sign in to comment.