How to recognize if the user has the admin role?

I’m building a web app using React.js and Next.js.
I want to keep my users in different roles and based on their roles, they have different access to this app.
Now I wonder how can I know if the logged-in user is Admin or not?
I always get the current user like this:
const u = await Parse.User.current();
Now, as you can see, I have the current user in the u variable.
So, how can I check if this user is an admin with my roles?

Sorry if my question seems a little odd, I’m just new to Parse.
Thanks (:

You can use something like this to check if an user has the admin role:

const adminRoleQuery = new Parse.Query(Parse.Role);
adminRoleQuery.equalTo('name', 'admin');
const userIsAdmin = (await adminRoleQuery.count()) > 0;