Skip to content

Commit

Permalink
quelques fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Killian Rakotonanahary committed Apr 26, 2024
1 parent 93849f4 commit ab4abcf
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions frontend/src/components/annotation/AnnotationButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ import { FilesService } from "../../client";

const AnnotationButtons = () => {
const { t } = useTranslation();
const {image} = useMainContext()
const {image, projects, project, deploymentData} = useMainContext()
const { saveandnext, handleAddObservation } = useAnnotationContext();
const [confirmationDelete, setConfirmationDelete] = useState<boolean>(false);
const [img, setImg] = useState<any>(null)

useEffect(() => {
console.log(project())
console.log(deploymentData)
}, [deploymentData])
const toggleModalDelete = () => {

setConfirmationDelete(!confirmationDelete)
Expand All @@ -33,8 +37,11 @@ const AnnotationButtons = () => {
.then(res => {
console.log(res)
})

window.location.href = "/project/1/deployment/6/details"
if(deploymentData)
{
window.location.href = `/project/${project().id}/deployment/${deploymentData.id}/medias`
}

setConfirmationDelete(false)
}

Expand Down

0 comments on commit ab4abcf

Please sign in to comment.