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

refractor SectionView #25

Open
KrystianKjjk opened this issue Jun 9, 2021 · 0 comments
Open

refractor SectionView #25

KrystianKjjk opened this issue Jun 9, 2021 · 0 comments
Assignees
Labels
Refractor Changes in code which doesn't change functionallity

Comments

@KrystianKjjk
Copy link
Collaborator

Actually component contains too much logic, he is used for
-display given section
-update given section
-create new section

Should be splited for 2 (at least) components

  • one should get sectionId from params, get info about that section and display to the user
  • second should operate "edit" and "create" - should optionally get section info from props (for update)

Important:

  • use "history.back" instead of "history.push('section')
  • get info about section and course in one request, not 2 like now (require update backend)
  • display "delete" only if section is given (edit mode)
@KrystianKjjk KrystianKjjk added the Refractor Changes in code which doesn't change functionallity label Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refractor Changes in code which doesn't change functionallity
Projects
None yet
Development

No branches or pull requests

2 participants