Skip to content

Commit

Permalink
chore: simplify index path link
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Aug 8, 2024
1 parent f1e4f0a commit 0387fdc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ import type { HeaderLink } from "#ui-pro/types";
const route = useRoute();
const isLivePreview = computed(() => route.path.includes("/live-preview"));
const indexPath = computed(() => {
const product = route.path.split("/").slice(2, 3).join("/");
if (product) return `/${product}`;
return "/";
});
const links = computed<HeaderLink[]>(() => [
{
Expand Down Expand Up @@ -80,7 +75,7 @@ const navigation = inject<Ref<NavItem[]>>("navigation", ref([]));
<UHeader :links="links">
<template #left>
<NuxtLink
:to="indexPath"
to="/"
class="flex items-center gap-2 text-lg font-bold text-gray-900 dark:text-white"
>
<Logo class="text-primary h-6 w-auto" />
Expand Down

0 comments on commit 0387fdc

Please sign in to comment.