fucking props!

This commit is contained in:
Sockenklaus
2023-07-02 19:56:51 +02:00
parent bc38291696
commit bf92a1ed9a
6 changed files with 47 additions and 21 deletions

View File

@@ -4,7 +4,7 @@
<script setup>
import { Link } from '@inertiajs/vue3'
import { h, ref } from 'vue';
import { h, ref, defineProps } from 'vue';
import { NIcon, NButton } from 'naive-ui'
import {
GroupsFilled as Users,
@@ -12,43 +12,45 @@
LogOutFilled as Logout
} from '@vicons/material'
const activeKey = ref(null)
const props = defineProps(['route'])
const activeKey = ref(props.route)
const menuOptions = ref([
{
label: () =>
h(
Link, {
href: "/Events",
href: "/events",
methode: "get"
},
"Veranstaltungen"
),
key: 'go-to-events',
key: '/events',
icon: renderIcon(Events)
},
{
label: () =>
h(
Link, {
href: "/Users",
href: "/users",
method: "get"
},
"Benutzer"
),
key: 'go-to-users',
key: '/users',
icon: renderIcon(Users)
},
{
label: () =>
h(
Link, {
href: "/Login",
href: "/login",
method: "get"
},
"Abmelden"
),
key: 'go-to-logout',
key: '/logout',
icon: renderIcon(Logout)
}
])