Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

[web] blog list #271

wants to merge 8 commits into from

Conversation

DagmawitG
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Aug 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
practice ❌ Failed (Inspect) Sep 2, 2022 at 0:29AM (UTC)
practice-project-vue ❌ Failed (Inspect) Sep 2, 2022 at 0:29AM (UTC)
practice-vue ❌ Failed (Inspect) Sep 2, 2022 at 0:29AM (UTC)

</v-card-title>

<v-card-subtitle>{{ blogPost.content }}</v-card-subtitle>
<nuxt-link :to="'/dagmawit/' + blogPost._id">
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:to="/dagmawit${blogPost._id}"

Comment on lines +33 to +35
<!-- <v-card-actions>
<v-btn text :to="'/dagmawit/' + blog._id"> Read More </v-btn>
</v-card-actions> -->
Copy link
Author

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/'">
Copy link
Author

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'
Copy link
Author

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)
Copy link
Author

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({
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants