refactor(components): update navbar and sidebar

wrap `new story` button with a nuxt-link
This commit is contained in:
parent d5c9866cb0
commit 5da97f5987
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C
2 changed files with 8 additions and 7 deletions

@ -61,12 +61,14 @@
<a-menu-item key="logout" v-if="!!data?.user"> Logout </a-menu-item> <a-menu-item key="logout" v-if="!!data?.user"> Logout </a-menu-item>
</a-menu> </a-menu>
<div> <div>
<a-button v-if="data?.user" type="primary" tooltip="Post a New Story" @click="() => navigateTo('/new-story')"> <nuxt-link to="/new-story">
<!-- <template #icon> <a-button v-if="data?.user" type="primary" tooltip="Post a New Story">
</template> --> <!-- <template #icon>
<icon istyle="regular" name="file-plus" /> </template> -->
<span style="margin-left: 0.5em"> Post a New Story </span> <icon istyle="regular" name="file-plus" />
</a-button> <span style="margin-left: 0.5em"> Post a New Story </span>
</a-button>
</nuxt-link>
</div> </div>
<div class="acbut" v-if="!data"> <div class="acbut" v-if="!data">
<a-button size="large" @click="() => navigateTo('/auth/login')"> Login </a-button> <a-button size="large" @click="() => navigateTo('/auth/login')"> Login </a-button>

@ -3,7 +3,6 @@
import { ItemType, theme } from "ant-design-vue"; import { ItemType, theme } from "ant-design-vue";
import Icon from "../icon.vue"; import Icon from "../icon.vue";
import { ISidebarItem } from "@models/sidebarEntry"; import { ISidebarItem } from "@models/sidebarEntry";
import { NuxtLink } from "#components";
const { useToken } = theme; const { useToken } = theme;
const { token } = useToken(); const { token } = useToken();