deprem-yardim-frontend icon indicating copy to clipboard operation
deprem-yardim-frontend copied to clipboard

refactor: index page

Open absolutezero13 opened this issue 2 years ago • 4 comments

Description

Refactor for index page includes;

  • useVerifiedLocations moved into LeafletMap as it's not ideal to have it in index.
  • Boxes with styles moved into their components

discord username: afetharita#0001

closes #issue

Please describe your changes. Also describe your aim and content. Do not forget to list the dependencies required caused by those changes.

## Things to check before creating a PR

  • [ ] I have inspected my topic, checked.
  • [ ] If it is a core feature, executed detailed tests.

Creating PR rules

  • [ ] PR must be created for an issue with approved tag. Otherwise PR will be rejected.
  • [ ] Relevant issue number: The issue number related to PR must be attached to head of PR header, after prefix after prefix # must be attached in parenthesis. A header like this could be used "prefix(#issue_number): PR header" .
  • [ ] A descriptive and understandable title: The PR title should clearly describe the nature and purpose of the changes. The PR title should be the first thing displayed when the PR is opened. And it should follow the semantic commit rules. For example, a title like "docs(#issueId): Add README.md" can be used.
  • [ ] Related file selection: Only relevant files should be touched and no other files should be affected.
  • [ ] Format and Lint Suitability : The code should be made in accordance with a certain format standard and examined according to the lint rules.
  • [ ] Clean commit history: The commits where the changes are made should be clear and organized.
  • [ ] Opening PR when job is completed: PR should be opened when job is completed and sent for review by other team members.

Changes

  • [ ] A new feature (a change that adds a new feature, not a breaking change)
  • [ ] A new refactor (a change that is not a breaking change, that improves the readability or performance of the code)
  • [ ] A breaking change
  • [ ] Documentation change

How were these changes tested?

Please describe the tests you did to test the changes you made. Please also specify your test configuration.

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

absolutezero13 avatar Feb 16 '23 07:02 absolutezero13

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
deprem-yardim-frontend ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 16, 2023 at 7:37AM (UTC)

vercel[bot] avatar Feb 16 '23 07:02 vercel[bot]

It's really good to move useVerifiedLocations to LeafletMap. It'll help us to prevent unnecessary renders.

puskuruk avatar Feb 16 '23 12:02 puskuruk

Not sure how this helps? if anything every data interaction needs to be here, and we ideally store it in a store so other components can read it too.

Curious how do y'all think that this will help @puskuruk @absolutezero13

usirin avatar Feb 16 '23 17:02 usirin

Not sure how this helps? if anything every data interaction needs to be here, and we ideally store it in a store so other components can read it too.

Curious how do y'all think that this will help @puskuruk @absolutezero13

it's still in the store, but I realize that only one component uses these data in index.ts, other components don't need it. So I moved it to the LeafletMap component, so other components won't render every time our data changes. Which is almost everything in the site.

absolutezero13 avatar Feb 16 '23 18:02 absolutezero13

gonna be obsolete after UI change, ty for the contribution.

usirin avatar Feb 19 '23 03:02 usirin