Day-12: Refactoring main Layout design for ShowwcaseXS

26 May, 2023

1

1

0

Today is May 5, 2023, I mentioned in my previous blog post that I had completed the basic layout for ShowwcaseXS. Today, my focus will be on updating layout A. Currently, the code for the layout is disorganized, and I need to rearrange it and create layout components for each tab on the navigation bar. This means that each tab, such as notifications, feeds, bookmarks, community, shows, etc., will have its own layout component. This way, when the user clicks on a tab on the navigation bar, the screen will directly navigate to that particular layout, and all the corresponding items for that tab will be displayed in that layout.


Combining road maps, shows, and series in a single layout would increase my workload since I need to call different APIs for each of them. Therefore, I decided to extend the length of the sidebar slightly and add tabs specifically for road maps, shows, and series. I added these features permanently. Additionally, I included headers and footers in the layout. Honestly speaking, this is coming out to be better than I've imagined for ShowwcaseXS.


https://media.tenor.com/lHbr1n92opcAAAAC/happy-smile.gif

The Layout component contains all the common items, and the only dynamic aspect will be the tab layout which changes based on the user's clicks on the navigation bar. I also included the ShowwcaseXS logo in the header and a footer with a copy. Let me you how pretty it is looking now.


Screenshot 2023-05-06 at 6.32.12 PM.png


Screenshot 2023-05-06 at 6.32.31 PM.png

Today, I focused on creating layouts for all eight navigations on ShowwcaseXS's navigation bar. I also implemented the functionality of displaying different navigation options when the user clicks on a particular tab. Initially, I faced some difficulties trying to pass a prop from the Layout component to its children components when I already had children in my Layout component. I explored various ways to pass extra props other than children from the Layout component to its children components, but I did not find any suitable solution. As a result, I decided to use the useContext() hook of React to pass props to different types of layouts when the user clicks on different navigation options on the navigation bar. Tomorrow, I plan to work on integrating APIs for some layouts.


https://media.tenor.com/o_iWIPAlXfgAAAAC/elephant-lets-go.gif


12.png

1

1

0

Pritesh Kiri
Software Engineer | Content creator | Technical Writer | Building @ShowwcaseXS @TaskTunes

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2024. Showcase Creators Inc. All rights reserved.