-
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
Natnael.demo practice #269
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
[web] andualem added basic UI
* [web] Implement Article CRUD
* create the UI * [web] implement vuex state management * [web] implement CRUD functionalities * [web] add authentication and fix previous comments
* [web]: sample structure for the demo * [web]: folder rename to PascalCase * [web]: remove feature folder from store * [web]: fix a bug inside index page * [web]: fix deployment bug
* [web][yohans] added some basic ui and simple database mocking array * [web][yohans] added some state for the blogs
* [web]: sample structure for the demo * [web]: remove feature folder from store * [web]: file rename issue with git solved * [WEB]: fix deploy error
commit('newBlog',response.data); | ||
}, | ||
async deleteBlog({commit},id){ | ||
await axios.delete(`https://blog-app-backend.onrender.com/api/articles/${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.
No need for an absolute path. Base URL is already set.
methods:{ | ||
toggleAddBlog(){ | ||
this.showAddBlog = !this.showAddBlog | ||
}, | ||
} | ||
|
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.
Please run npm run lintfix
before committing.
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 will fix indentation and other style problems
const response = await axios.get( | ||
`https://blog-app-backend.onrender.com/api/articles/${this.$route.params.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.
All reading and writing data should be handled by vuex.
title: '', | ||
content: '' |
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.
Instead, a better approach is to declare blog object
blog: {
title: '',
content: ''
}
const newBlog = { | ||
title: this.title, | ||
content: this.content | ||
} |
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 is unnecessary if the above comment is addressed.
title: this.title, | ||
content: this.content | ||
} | ||
this.addBlog(newBlog) |
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.addBlog(this.blog)
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.
Do we need to add all the react files to the commit?
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 PR has changes from another project (React web project). Please make sure your changes are limited to your scope.
|
I have done a basic UI and fetched the data from backend. I am working on posting a new blog and updating it.