diff --git a/pages/admin.tsx b/pages/admin.tsx index 0d05a46..7e46540 100644 --- a/pages/admin.tsx +++ b/pages/admin.tsx @@ -204,6 +204,9 @@ const Admin = (props: Props) => { const onChangeRole = async (e: React.ChangeEvent, user: User) => { const body = { selectedUserEmail: user.email, selectedUserRole: e.target.value } fetcher('/api/user/update', 'PUT', body) + setTimeout(() => { + router.refresh(); + }, 2000) }; const onDeleteUser = async (userEmail: string) => { @@ -366,7 +369,6 @@ const Admin = (props: Props) => { {isSuperAdmin && } - } {info.role !== Role.SELLER && }