[chore/frogend] fix profile preview css, use role info (#1130)

* fix profile preview css, use role info

* remove unused redux selector
This commit is contained in:
f0x52
2022-11-23 16:10:02 +01:00
committed by GitHub
parent 1281a9fd4a
commit 5ba5fb3154
5 changed files with 52 additions and 29 deletions

View File

@ -97,7 +97,10 @@ module.exports = function oauthAPI({ apiCall, getCurrentUrl }) {
}
// newer GoToSocial version will include a `role` in the Account data, check that first
// TODO: check account data for admin status
if (state.user.profile.role == "admin") {
dispatch(oauth.setAdmin(true));
return true;
}
// no role info, try fetching an admin-only route and see if we get an error
return Promise.try(() => {