Skip to content

Commit

Permalink
Update [name].vue
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Feb 15, 2024
1 parent f14a071 commit a216ea1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MyApp.Client/src/pages/posts/author/[name].vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import { useRoute } from "vue-router"
const route = useRoute()
const name = (route.params as any)?.name
const meta:VirtualPress = inject('meta')!
const press:VirtualPress = inject('press')!
const author = meta.posts.authors.find((x:any) => generateSlug(x.name) == name)
const authorPosts:Post[] = author ? meta.posts.posts.filter((x:any) => x.author.toLowerCase() == author.name.toLowerCase()) : []
const author = press.blog.authors.find((x:any) => generateSlug(x.name) == name)
const authorPosts:Post[] = author ? press.blog.posts.filter((x:any) => x.author.toLowerCase() == author.name.toLowerCase()) : []
if (author) {
useHead({ title: `${author.name} posts` })
Expand Down

0 comments on commit a216ea1

Please sign in to comment.