Skip to content

Commit

Permalink
refactor(Navbar): Remove lazy loading dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Nov 7, 2023
1 parent 5de726e commit 645b4eb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/Navbar/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

<template #end>
<div v-if="!isMobileOrTablet" class="notMobileOrTablet">
<LazyNDropdown placement="bottom-start" trigger="click" :options="dropdownOptions" :style="{ padding: '8px', minWidth: '200px' }"
<n-dropdown placement="bottom-start" trigger="click" :options="dropdownOptions" :style="{ padding: '8px', minWidth: '200px' }"
@select="handleDropdownSelect">
<img :src="user?.picture" class="w-8 h-8 object-cover rounded-full ring-2 cursor-pointer" />
</LazyNDropdown>
</n-dropdown>
</div>
</template>
Expand All @@ -27,7 +27,6 @@
</template>
<script setup lang="ts">
import { defineAsyncComponent } from "#imports"
import { NaiveIcon, AccountInfo } from "#components";
import type { NavbarRoute } from "@bg-dev/nuxt-naiveui";
import type { DropdownOption } from "naive-ui";
Expand All @@ -36,8 +35,6 @@ const { user } = useAuthSession();
const { logout } = useAuth();
const { isMobileOrTablet } = useNaiveDevice();
const LazyNDropdown = defineAsyncComponent(() => import("naive-ui/es/dropdown/src/Dropdown"))
const routes: NavbarRoute[] = [];
const drawerRoutes: NavbarRoute[] = [
Expand Down

0 comments on commit 645b4eb

Please sign in to comment.