-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(role based view): implemented a role based view for user groups (#…
…175) * feat(Role based users view): configure role based user view * feat(role based view): inplimanting a role based view for user groups * feat(role based view): inplimanting a role based view for user groups * feat(Role based users view): configure role based user view * feat(Role based users view): configure role based user view * feat(Role based users view): configure role based user view * feat(Role based users view): configure role based user view * feat(Role based users view): configure role based user view * feat(Role based users view): configure role based user view * feat(Role based users view): configure role based user view * feat(Role based users view): configure role based user view --------- Co-authored-by: Adewale Sangobiyi <[email protected]> Co-authored-by: Adewale Sangobiyi <[email protected]>
- Loading branch information
1 parent
103c04e
commit fa0ac18
Showing
11 changed files
with
192 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,7 @@ | |
] | ||
}, | ||
{ | ||
"username": "onemac-micro-[email protected]", | ||
"username": "[email protected]", | ||
"attributes": [ | ||
{ | ||
"Name": "email", | ||
|
@@ -172,5 +172,26 @@ | |
"Value": "onemac-micro-statesubmitter" | ||
} | ||
] | ||
}, | ||
{ | ||
"username": "[email protected]", | ||
"attributes": [ | ||
{ | ||
"Name": "email", | ||
"Value": "[email protected]" | ||
}, | ||
{ | ||
"Name": "given_name", | ||
"Value": "bad" | ||
}, | ||
{ | ||
"Name": "family_name", | ||
"Value": "football" | ||
}, | ||
{ | ||
"Name": "email_verified", | ||
"Value": "true" | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { OneMacUser, useGetUser } from "@/api/useGetUser"; | ||
import { PropsWithChildren, createContext, useContext } from "react"; | ||
|
||
const initialState = { user: null }; | ||
|
||
export const UserContext = createContext<OneMacUser | undefined>(initialState); | ||
export const UserContextProvider = ({ children }: PropsWithChildren) => { | ||
const { data: userData } = useGetUser(); | ||
return ( | ||
<UserContext.Provider value={userData}>{children}</UserContext.Provider> | ||
); | ||
}; | ||
|
||
export const useUserContext = () => useContext(UserContext); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.