1
2
3
4
5
6
7
8
9
10
11
12
| /**
| * @see https://umijs.org/docs/max/access#access
| * */
| export default function access(
| initialState: { currentUser?: API.CurrentUser } | undefined
| ) {
| const { currentUser } = initialState ?? {};
| console.log(currentUser, "currentUser");
| return {
| canAdmin: currentUser && currentUser.id === 1,
| };
| }
|
|