droidconKE / droidconKE2022ReactNative

Official DroidconKE 2022 React Native App
https://play.google.com/store/apps/details?id=com.brianwachira.droidconKE2022ReactNative&hl=en&gl=US
MIT License
8 stars 17 forks source link

[chore] extract reusable header component #52

Closed devKiratu closed 1 year ago

devKiratu commented 1 year ago

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

The reusable MainHeader component is extracted from similar header code across Screens, thus removing code repetition. This fixes #45

It renders differently based on whether a user signed in or not. It is shared by the following screens:

HomeScreenNotLoggedIn.tsx   
HomeScreen.tsx   
FeedScreen.tsx
AboutScreen.tsx

The MainHeader component also fixes #44 ( header components shifting off screen)

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Screenshots:

Home Screen

Signed out

Screenshot 2022-10-13 at 13-14-38 WhatsApp Image 2022-10-13 at 12 46 19 (2) jpeg (JPEG Image 606 × 1280 pixels) — Scaled (55%)

Signed in

Screenshot 2022-10-13 at 13-16-43 WhatsApp Image 2022-10-13 at 12 46 19 (1) jpeg (JPEG Image 606 × 1280 pixels) — Scaled (55%)

Feed Screen

Screenshot 2022-10-13 at 13-17-22 WhatsApp Image 2022-10-13 at 12 46 18 (1) jpeg (JPEG Image 720 × 1520 pixels) — Scaled (46%)

About Screen

Screenshot 2022-10-13 at 13-18-16 WhatsApp Image 2022-10-13 at 12 46 17 jpeg (JPEG Image 606 × 1280 pixels) — Scaled (55%)

Checklist:

devKiratu commented 1 year ago

@brianwachira please review

devKiratu commented 1 year ago

Good work @devKiratu

Thanks!