adrianhajdin / aora

Build your first mobile application
https://jsmastery.pro
1.41k stars 259 forks source link

putting real username in home.jsx #3

Closed PARVNEMA closed 4 months ago

PARVNEMA commented 4 months ago

you have written jsmMastry in username in home instead you can can import Globalcontext user and put user.username in place of JSMastery

bonacciniWd commented 4 months ago

could you add that code on your home screen code for it:

First- 🥇 import the GlobalContext :

import { useGlobalContext } from "../../context/GlobalProvider";

then, add a new const -

const { user } = useGlobalContext();

and finally, change the Text render component

              <Text className="text-2xl font-psemibold text-white">
                  {user?.username}     
              </Text>
HerbertNtim commented 4 months ago

Alright thank you for the help