#Baepsae

1 messages · Page 1 of 1 (latest)

sullen hollyBOT
rough dock
#

I have done something like this inside the App compoenent isAuthorized ? <MainViews userContext={userContext} /> : <Auth environment={environment} />

brittle stratus
rough dock
#

But it doesn't work for me with the concept of navigation

#

Hi @brittle stratus , thank you for the quick reply (:

I understand authorization is not something I do through the stripe-app.json file, in this file it's where we define the viewports and provide each of them with a component to show.

I don't understand though, how I go on about conditioning if the user is not authorized in whichever viewport, they will see the authorization screen

brittle stratus
rough dock
#

So for each view component should I have a isAuthorized state?
Let's say this is the DashboardView component, it should look like this?
isAuthorized ? <Dashboard /> : <Auth />

And then say we have AnalyticsView component, it should look like this?
isAuthorized ? <Analytics /> : <Auth />

Just thought maybe I could wrap the authorized views like I originally did in the code I sent here in the thread previously, but I guess that's not possible?

brittle stratus
#

I haven't seen the previous thread

rough dock
#

I mean this thread

#

This code

isAuthorized ? <MainViews userContext={userContext} /> : <Auth environment={environment} />

#

And MainViews component includes all the authorized views

brittle stratus