The issue you're facing is that the computed property project is not being updated when the shared data props.project changes. This is because the computed property is not reactive to changes in the shared data.
To solve this, you can use a watch function to watch for changes in the props.project and update the project computed property accordingly. Here's an example of how you can modify your code:
<script setup>
import { Head, Link, router, usePage, watch, ref } from '@inertiajs/vue3'
const { props } = usePage()
const project = ref(props.project)
// watch for changes in props.project and update the project computed property
watch(() => props.project, (newProject) => {
project.value = newProject
})
// method to change object property in Laravel
const confirm = () => router.patch(route('auth.project.confirm', project.value.id), { preserveState: false })
</script>
<template>
<p>{{ project.confirmationDue }}</p>
</template>
By using the watch function, the project computed property will be updated whenever props.project changes. This should ensure that the computed property reflects the updated value of project.confirmationDue.
Remember to import the watch and ref functions from @inertiajs/vue3 to use them in your code.