mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-16 21:24:19 +00:00
fix configuration page on safari w/ jasquat
This commit is contained in:
parent
5a51cc9b18
commit
339745b6a8
@ -23,10 +23,11 @@ export default function Configuration() {
|
|||||||
[targetUris.authenticationListPath]: ['GET'],
|
[targetUris.authenticationListPath]: ['GET'],
|
||||||
[targetUris.secretListPath]: ['GET'],
|
[targetUris.secretListPath]: ['GET'],
|
||||||
};
|
};
|
||||||
const { ability } = usePermissionFetcher(permissionRequestData);
|
const { ability, permissionsLoaded } = usePermissionFetcher(
|
||||||
|
permissionRequestData
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('Configuration remove error');
|
|
||||||
removeError();
|
removeError();
|
||||||
let newSelectedTabIndex = 0;
|
let newSelectedTabIndex = 0;
|
||||||
if (location.pathname.match(/^\/admin\/configuration\/authentications\b/)) {
|
if (location.pathname.match(/^\/admin\/configuration\/authentications\b/)) {
|
||||||
@ -35,6 +36,13 @@ export default function Configuration() {
|
|||||||
setSelectedTabIndex(newSelectedTabIndex);
|
setSelectedTabIndex(newSelectedTabIndex);
|
||||||
}, [location, removeError]);
|
}, [location, removeError]);
|
||||||
|
|
||||||
|
// wow, if you do not check to see if the permissions are loaded, then in safari,
|
||||||
|
// you will get {null} inside the <TabList> which totally explodes carbon (in safari!).
|
||||||
|
// we *think* that null inside a TabList works fine in all other browsers.
|
||||||
|
if (!permissionsLoaded) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tabs selectedIndex={selectedTabIndex}>
|
<Tabs selectedIndex={selectedTabIndex}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user