fix: update profile paths

Use path "/profile/:username" instead "@:username" as specified in FRONTEND_INSTRUCTIONS.md
This commit is contained in:
Sándor Levcsák 2020-10-13 17:37:41 +03:00 committed by mutoe
parent 85b2fd2a7c
commit fc30d4299a
4 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@
<div class="info">
<RouterLink
:to="`/@${article.author?.username}`"
:to="`/profile/${article.author?.username}`"
class="author"
>
{{ article.author?.username }}

View File

@ -1,12 +1,12 @@
<template>
<div class="article-preview">
<div class="article-meta">
<RouterLink :to="`/@${article.author.username}`">
<RouterLink :to="`/profile/${article.author.username}`">
<img :src="article.author.image">
</RouterLink>
<div class="info">
<RouterLink
:to="`/@${article.author.username}`"
:to="`/profile/${article.author.username}`"
class="author"
>
{{ article.author.username }}

View File

@ -21,7 +21,7 @@ export function useNavigationLinks ({ user }: UseLinksProps) {
{ to: '/register', title: 'Sign up', display: 'anonym' },
{ to: '/editor', title: 'New Post', display: 'authorized', icon: 'ion-compose' },
{ to: '/settings', title: 'Settings', display: 'authorized', icon: 'ion-gear-a' },
{ to: `/@${username.value}`, title: username.value || '', display: 'authorized' },
{ to: `/profile/${username.value}`, title: username.value || '', display: 'authorized' },
]
const navLinks = computed(() => allNavLinks.filter(

View File

@ -10,8 +10,8 @@ const router = createRouter({
{ path: '/article/:slug', component: () => import('./pages/Article.vue') },
{ path: '/login', component: () => import('./pages/Login.vue') },
{ path: '/register', component: () => import('./pages/Register.vue') },
{ path: '/@:username', component: () => import('./pages/Profile.vue') },
{ path: '/@:username/favorites', component: () => import('./pages/Profile.vue') },
{ path: '/profile/:username', component: () => import('./pages/Profile.vue') },
{ path: '/profile/:username/favorites', component: () => import('./pages/Profile.vue') },
],
})