Skip to content

Commit

Permalink
お題変わったら変換
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubosaka authored and hikahana committed Nov 14, 2024
1 parent 94ee97b commit 23199eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion app/src/app/camera/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,16 @@ const CameraApp = () => {
const notAnsweredAssignment = newAssignments.find(
(assignment: todayAssignment) => !assignment.isAnswered,
);

setTodayAssignment(notAnsweredAssignment);

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

if (newAssignments.every((assignment) => assignment.isAnswered)) {
setIsActive(false);
}
} catch (error) {
setIsUploading(false);
console.error("アップロード中にエラーが発生しました:", error);
Expand Down Expand Up @@ -461,7 +470,7 @@ const CameraApp = () => {
)}
</>
) : (
<Answered assignments={assignments}/>
<Answered assignments={assignments} />
)}
</>
);
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 23199eb

Please sign in to comment.