Environment Variables can be used with the following code.
Environment Variable
NEXT_PUBLIC_HOSTING_VARAIBLE=localhost
to access the environment variable in Component
process.env.NEXT_PUBLIC_HOSTING_VARAIBLE