Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Role based routing-Svelte

$
0
0

I have a use case where routes are the same but the UI for those routes depends on the role selected by the user while setting up an account.

Roles are : Business Owner, Fleet manager, Operational manager, Hiring coordinate

Routes are: /dashboard, /capacity, /cashflow,

For business owner, the UI for the /dashboard will be different, and so on with other roles as well.

What is the suitable approach to implement this type of routing in Svelte?

My current route grouping is this.

(role)  |   --> /dashboard   -->/capacity   -->/cashflow   -->+layout.svelte

I could have done like

(roles)   (business-owner)            |            --> /dashboard            --> /capacity            --> /cashflow            --> +layout.svelte  (fleet-manager)          |            --> /dashboard            --> /capacity            --> /cashflow            -->+layout.svelte

but this will be redundant


Viewing all articles
Browse latest Browse all 1541

Trending Articles