Revert "added ssr?????"

This reverts commit 5371f784fb.
This commit is contained in:
Sockenklaus
2023-07-08 18:38:18 +02:00
parent 5371f784fb
commit 39a28cbd14
12 changed files with 18 additions and 1974 deletions

View File

@@ -7,22 +7,21 @@
/>
</template>
<script setup lang="ts">
import type { MenuOption } from 'naive-ui'
<script setup>
import { Link, usePage } from '@inertiajs/vue3'
import { h, ref } from 'vue';
import { NIcon } from 'naive-ui'
import { h, ref, watch } from 'vue';
import { NIcon, NButton } from 'naive-ui'
import {
GroupsFilled as Users,
EventNoteFilled as Events,
LogOutFilled as Logout
} from '@vicons/material'
const isAdmin: boolean = (usePage().props.isAdmin as boolean)
const activeKey = ref<string>((usePage().props.request as any)?.url)
const { request, isAdmin } = usePage().props
const activeKey = ref(request.url)
const menuOptions: MenuOption[] = []
menuOptions.push({
const menuOptions = ref([])
menuOptions.value.push({
label: () =>
h(
Link, {
@@ -35,7 +34,7 @@
icon: renderIcon(Events)
})
if(isAdmin) menuOptions.push({
if(isAdmin) menuOptions.value.push({
label: () =>
h(
Link, {
@@ -48,7 +47,7 @@
icon: renderIcon(Users)
})
menuOptions.push({
menuOptions.value.push({
label: () =>
h(
Link, {
@@ -64,7 +63,7 @@
function renderIcon(icon: any) {
function renderIcon(icon) {
return () => h(NIcon, null, { default: () => h(icon) })
}