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

Wokers list #7

Merged
merged 8 commits into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default as CreateWorkerForm } from "./CreateWorkerForm";

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please could you explain why you've added this commit? Thanks to version control there isn't any need to add white space - if you absolutely need to add a TODO you can add commented out lines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just fixed the code according to all the comments from the reviews.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Harriethw I originally added that file to make it more clear and tidy when we will import them inside App.js or /pages. More info here https://www.digitalocean.com/community/tutorials/react-index-js-public-interfaces#using-indexjs

Copy link
Collaborator

Choose a reason for hiding this comment

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

@g1st ah I just meant that we don't need empty white space, which is all this commit seems to add unless I'm missing something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yesterday we made a customer list with Hadiyah. It doesn't work on her computer. I made the same code for workers and it works. I added empty spaces for her code. :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh sorry @Harriethw yes I agree. I already proposed @GTabala to use Prettier and it can take care of those empty spaces for us!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prettier doesn't delete empty lines.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, I don't know who does it then but when I save a file with loads of empty lines they get deleted for me.

export { default as ShowWorkersForm } from "./ShowWorkersForm";
1 change: 1 addition & 0 deletions client/src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default as CreateWorker } from "./CreateWorker.js";

export { default as ShowWorkers } from "./ShowWorkers.js";
7 changes: 7 additions & 0 deletions client/src/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ export const postWorkers = async (data) => {
return response.data;
};








export const getWorkers = async (data) => {
const response = await get("/workers", data);
return response.data;
Expand Down