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

Refactor create page #426

Closed
xiaoniuniu89 opened this issue Sep 21, 2023 · 5 comments
Closed

Refactor create page #426

xiaoniuniu89 opened this issue Sep 21, 2023 · 5 comments

Comments

@xiaoniuniu89
Copy link
Contributor

Context

The create page is becoming quite hard to maintain. It would be good to extract the business logic out into a useCreatePage hook and/extract some of the jsx out like all of the wrappers.

Expected Behavior

As a developer, I can easily navigate the create page, so I can add/update features without relying on the search feature to get back to where I need.

Current Behavior

The logic for updating and creating and fetching data is in one huge clump. The important jsx like, editor, preview etc is lost in a sea of jsx and it is hard to get to where you want.

@xiaoniuniu89
Copy link
Contributor Author

can assign to me , will shoehorn refactoring business logic into a hook in my next pr re markdown support so we can clean this page up a bit

@NiallJoeMaher
Copy link
Contributor

This might be easier with the new /app router too. When we can have errors and layouts in different files.

@John-Paul-Larkin
Copy link
Member

Hi Daniel. Have you got to this yet?
I wouldnt mind giving it a try.

@xiaoniuniu89
Copy link
Contributor Author

go for it

@xiaoniuniu89
Copy link
Contributor Author

I think we can close this. there is a useCreatePage hook that makes page more readable now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants