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

New comments functionality #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ArielBatkilin
Copy link
Contributor

some comments in frontend

Copy link
Contributor

@Nitay880 Nitay880 left a comment

Choose a reason for hiding this comment

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

Looks like comments functionality is here in it's full power, well done!

Copy link
Contributor

@nvgoldin nvgoldin left a comment

Choose a reason for hiding this comment

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

Nice work!

There seem to be a mess with the commits - this branch also includes a different PR (I see changes in other files too)

import axios from "axios";


import authHeader from '../../services/auth-header';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this to the story-service instead and extend it with the needed calls?

Copy link
Contributor

Choose a reason for hiding this comment

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

done

}

handleSubmit(event) {
axios.post(API_URL + '/story/comment', {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here -> move to the service

Copy link
Contributor

Choose a reason for hiding this comment

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

done

}

get_comments() {
return axios.get(API_URL + '/story/comment', {
Copy link
Contributor

Choose a reason for hiding this comment

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

same

path = path.replace("thumb/", "");
return path
function get_comments(){
return ["thats amazing!","unbelivable!"]
Copy link
Contributor

Choose a reason for hiding this comment

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

? should probably be removed

Copy link
Contributor

Choose a reason for hiding this comment

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

yup

Copy link
Contributor

@matanel-oren matanel-oren left a comment

Choose a reason for hiding this comment

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

CardComponent properties and design should be shared by our 2 layers, the only difference between those two is the author property. Therefore, it will be sensible to get all its properties (title, content, image path, and comments) in its constructor, and afterwards to use them when rendering.

Copy link
Contributor

@matanel-oren matanel-oren left a comment

Choose a reason for hiding this comment

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

Another comment: I don't understand the distinction between Card and CardComponent. Maybe we can unify them?

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.

4 participants