diff --git a/src/api/routes.ts b/src/api/routes.ts index 49c0b4b8a5a98f06c25b67a360eae6caee599f92..8e4a8a442f65bd894959c7f303145c84268d3f89 100644 --- a/src/api/routes.ts +++ b/src/api/routes.ts @@ -10,6 +10,7 @@ export enum AuthRoutes { reservation = '/reservation', choseRole = '/choseRole', vehicle = '/vehicle', + driver = '/driver', } /** diff --git a/src/roles/Driver.tsx b/src/roles/Driver.tsx new file mode 100644 index 0000000000000000000000000000000000000000..1f0c3fb67328a2ff43de296777e611c3da7c2cc5 --- /dev/null +++ b/src/roles/Driver.tsx @@ -0,0 +1,7 @@ +import { withAuthorization } from 'components/Authorization/Authorization'; +import { Roles } from 'roles/userRoles'; + +/** + * Wrapper for pages that can be accessed by drivers. + */ +export const Driver = withAuthorization([Roles.driver]);