(u: User)
| 38 | }, []); |
| 39 | |
| 40 | function applyGroups(u: User) { |
| 41 | op.setGroups(u.groupIds); |
| 42 | for (const id of u.groupIds) { |
| 43 | const meta = PRESET_GROUPS.find((g) => g.id === id); |
| 44 | if (meta) { |
| 45 | op.upsertGroup({ id, ...meta }); |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | function login(u: User) { |
| 51 | localStorage.setItem('op_testbed_user', JSON.stringify(u)); |
no test coverage detected