first fixes
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { Link } from '@inertiajs/vue3'
|
||||
|
||||
defineProps<{ components: any[] }>()
|
||||
import { Link } from '@adonisjs/inertia/vue'
|
||||
import ComponentsViewer from '~/pages/widgets/ComponentsViewer.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h3 class="text-3xl font-semibold text-gray-700">Components</h3>
|
||||
<Link
|
||||
href="/components/create"
|
||||
@@ -17,27 +16,6 @@ defineProps<{ components: any[] }>()
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
<template v-if="components.length > 0">
|
||||
<div
|
||||
v-for="component in components"
|
||||
:key="component.id"
|
||||
class="p-4 border rounded-lg shadow hover:shadow-lg transition"
|
||||
>
|
||||
<h4 class="font-semibold text-lg text-gray-800">{{ component.name }}</h4>
|
||||
<p class="text-gray-600">Type: {{ component.type?.name }}</p>
|
||||
<p class="text-indigo-600 font-semibold">Price: ${{ component.price }}</p>
|
||||
<Link
|
||||
:href="`/components/${component.id}`"
|
||||
class="mt-2 inline-block text-indigo-600 hover:text-indigo-700"
|
||||
>
|
||||
View Details
|
||||
</Link>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p class="text-gray-500">No components yet. Create one to get started!</p>
|
||||
</template>
|
||||
</div>
|
||||
<ComponentsViewer />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user