what I see you are passing params of params: { id: project.id, project: project }}
in your Project detail page you are accepting only the id as String type
<template>
<div class="container" style="padding: 6rem 0px;">
<div class="card">
<div class="row">
<h2>{{ $route.params.id }}</h2>
<h2>{{ $route.params.name }}</h2>
</div>
</div>
</div>
</template>
<script>
export default {
name: "ProjectsDetail",
props: {
id: {
required: true,
type: String
},
// Accept project as Object
project: {
required: true,
type: Object
}
},
}
</script>
I think passing project to project detail page and accepting as Object will have the id, no need passing id again