-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[web] blog list #271
base: main
Are you sure you want to change the base?
[web] blog list #271
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
</v-card-title> | ||
|
||
<v-card-subtitle>{{ blogPost.content }}</v-card-subtitle> | ||
<nuxt-link :to="'/dagmawit/' + blogPost._id"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:to="/dagmawit${blogPost._id}
"
<!-- <v-card-actions> | ||
<v-btn text :to="'/dagmawit/' + blog._id"> Read More </v-btn> | ||
</v-card-actions> --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
@@ -0,0 +1,43 @@ | |||
<template> | |||
<div> | |||
<nuxt-link :to="'/dagmawit/'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to="dagmawit"
</template> | ||
|
||
<script> | ||
import axios from 'axios' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to import axios. you can access it using this.$axios
this.blogTitle = response.data.title | ||
this.blogContent = response.data.content | ||
} catch (err) { | ||
console.log(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; no-console
) | ||
this.blog = this.response.data | ||
} catch (err) { | ||
this.$nuxt.error({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page crashes when it loads. it isn't fetching the blog ig
and better copy the method to a store actions and call it like this.$store.dispatch('dagmawit/fetchblogDetail', id)
etc
also use this.$axios for requests too
No description provided.