Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Baakoma committed Oct 28, 2024
1 parent 4de50fe commit 368e191
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions resources/js/Shared/Layout/UserLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
import InertiaLink from '@/Shared/InertiaLink.vue'
import AppLayout from '@/Shared/Layout/AppLayout.vue'
import { usePage } from '@inertiajs/vue3'
import { computed } from 'vue'
const props = defineProps({
user: Object,
title: String,
})
const page = usePage()
const pages = computed(() => [
{
name: 'Informacje podstawowe',
Expand All @@ -34,8 +31,6 @@ const pages = computed(() => [
href: `/vacation/requests?user=${props.user.id}`,
},
])
const current = computed(() => pages.value.find(item => page.url === (item.href)))
</script>

<template>
Expand Down Expand Up @@ -67,11 +62,11 @@ const current = computed(() => pages.value.find(item => page.url === (item.href)
v-for="page in pages"
:key="page.href"
:href="page.href"
:class="[current.href === page.href ? 'text-blumilk-600 font-semibold' : 'hover:bg-blumilk-25 text-gray-700 focus:z-10', 'group relative min-w-0 flex-1 overflow-hidden focus:outline-blumilk-500 bg-white p-4 text-sm font-medium text-center']"
:class="[$page.url === page.href ? 'text-blumilk-600 font-semibold' : 'hover:bg-blumilk-25 text-gray-700 focus:z-10', 'group relative min-w-0 flex-1 overflow-hidden focus:outline-blumilk-500 bg-white p-4 text-sm font-medium text-center']"
>
<span>{{ page.name }}</span>
<span
:class="[current.href === page.href ? 'bg-blumilk-500' : 'bg-transparent', 'absolute inset-x-0 bottom-0 h-0.5']"
:class="[$page.url === page.href ? 'bg-blumilk-500' : 'bg-transparent', 'absolute inset-x-0 bottom-0 h-0.5']"
/>
</InertiaLink>
</div>
Expand Down

0 comments on commit 368e191

Please sign in to comment.