I want to display a modal form tab1 for tab2 and tab3 if user is not logged in , if user is logged in he has to display the origin content of the tab [closed]

i want “OLX” like login form displaying from tab1 when user is logged in it has to display the content of the tab2 and tab3 otherwise login modal should be displayed on the place of tab2 and tab3 . when user is not logged in .when user is logged in it has to render automatically on tab1.
i m expecting olx like modal displaying when user is logged in on the click of tabs apart of home tab how can i do that in react native expo tsx. i used useContext api for checking user is logged or not.