Fix admin users role setter name collision
This commit is contained in:
parent
27fc8ee2d1
commit
1865071bee
1 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ export default function AdminUsersPage() {
|
|||
.catch(() => setError(t('adminRequired')));
|
||||
}, []);
|
||||
|
||||
async function setRole(userId: string, role: string) {
|
||||
async function setUserRole(userId: string, role: string) {
|
||||
setMessage(null);
|
||||
setError(null);
|
||||
setLoading(true);
|
||||
|
|
@ -172,7 +172,7 @@ export default function AdminUsersPage() {
|
|||
<tr key={u.id} style={{ borderTop: '1px solid #eee' }}>
|
||||
<td style={{ padding: 8 }}>{u.email}</td>
|
||||
<td style={{ padding: 8 }}>
|
||||
<select value={u.role} onChange={(e) => setRole(u.id, e.target.value)} disabled={loading || role !== 'ADMIN'}>
|
||||
<select value={u.role} onChange={(e) => setUserRole(u.id, e.target.value)} disabled={loading || role !== 'ADMIN'}>
|
||||
{roleOptions.map((r) => (
|
||||
<option key={r} value={r}>
|
||||
{r}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue