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>
<div>
<a-button v-if="data?.user" type="primary" tooltip="Post a New Story" @click="() => navigateTo('/new-story')">
<!-- <template #icon>
</template> -->
<icon istyle="regular" name="file-plus" />
<span style="margin-left: 0.5em"> Post a New Story </span>
</a-button>
<nuxt-link to="/new-story">
<a-button v-if="data?.user" type="primary" tooltip="Post a New Story">
<!-- <template #icon>
</template> -->
<icon istyle="regular" name="file-plus" />
<span style="margin-left: 0.5em"> Post a New Story </span>
</a-button>
</nuxt-link>
</div>
<div class="acbut" v-if="!data">
<a-button size="large" @click="() => navigateTo('/auth/login')"> Login </a-button>

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