refactor(components): update navbar and sidebar
wrap `new story` button with a nuxt-link
This commit is contained in:
parent
d5c9866cb0
commit
5da97f5987
@ -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">
|
||||||
|
<a-button v-if="data?.user" type="primary" tooltip="Post a New Story">
|
||||||
<!-- <template #icon>
|
<!-- <template #icon>
|
||||||
</template> -->
|
</template> -->
|
||||||
<icon istyle="regular" name="file-plus" />
|
<icon istyle="regular" name="file-plus" />
|
||||||
<span style="margin-left: 0.5em"> Post a New Story </span>
|
<span style="margin-left: 0.5em"> Post a New Story </span>
|
||||||
</a-button>
|
</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();
|
||||||
|
Loading…
Reference in New Issue
Block a user