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

duplicated components #16

Open
atherdon opened this issue Jan 8, 2019 · 11 comments
Open

duplicated components #16

atherdon opened this issue Jan 8, 2019 · 11 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed high

Comments

@atherdon
Copy link
Member

atherdon commented Jan 8, 2019

i think it's obvious task

when i see this import, it's easy to find out what should be improved.
https://github.com/GroceriStar/pdf-export-component/blob/master/src/index.js#L15-L29

So right now we have 4 components that triplicated, because we have 3 different cases for displaying data.
But i also want to have 4th case to add, but this will be a problem - because a lot of code is similar.
I think we should create some sort of a component, where we'll pass a type property and it'll define which case we'll cover.

@atherdon atherdon added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers high labels Jan 8, 2019
@atherdon
Copy link
Member Author

what do you think about this task @vadim9999

@atherdon
Copy link
Member Author

just checking, maybe you working on something else...

@vadim9999
Copy link
Collaborator

I will try to resolve this problem

@atherdon
Copy link
Member Author

perfect. i think the first version will be just component with switch inside i think i did something similar at showcase at tile layout.

btw, did we chat with you about adding layout for displaying recipes?
and do we need to test a new version without fetch inside in https://github.com/GroceriStar/react-print-pdf?

@atherdon
Copy link
Member Author

@vadim9999
Copy link
Collaborator

Sorry, I don't remember about displaying recipes

@vadim9999
Copy link
Collaborator

vadim9999 commented Jan 15, 2019

I think needs make some simple test in react-print-pdf

@atherdon
Copy link
Member Author

no probm - i think it was just in my head and we didn't talk about it.
if it will be an easy for you - maybe we should create a quick version of recipe layout before working on this task,

@atherdon
Copy link
Member Author

@vadim9999 can you tell me more information about what tests we should run? i can do it myself and save you some time...

@vadim9999
Copy link
Collaborator

@atherdon just pass data to component

@atherdon
Copy link
Member Author

got it. ok i think i can handle that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed high
Projects
None yet
Development

No branches or pull requests

2 participants