mirror of https://github.com/portainer/portainer
fix(home): allow non-admins [EE-4873] (#8297)
parent
4bdf30c038
commit
329e8bcad5
|
@ -2,7 +2,7 @@ import { Link } from 'lucide-react';
|
|||
import { useState } from 'react';
|
||||
|
||||
import { Environment } from '@/react/portainer/environments/types';
|
||||
import { useSettings } from '@/react/portainer/settings/queries';
|
||||
import { usePublicSettings } from '@/react/portainer/settings/queries';
|
||||
import { Query } from '@/react/portainer/environments/queries/useEnvironmentList';
|
||||
import { isEdgeEnvironment } from '@/react/portainer/environments/utils';
|
||||
|
||||
|
@ -18,11 +18,10 @@ export function AMTButton({
|
|||
envQueryParams: Query;
|
||||
}) {
|
||||
const [isOpenDialog, setOpenDialog] = useState(false);
|
||||
const isOpenAmtEnabledQuery = useSettings(
|
||||
(settings) =>
|
||||
settings.EnableEdgeComputeFeatures &&
|
||||
settings.openAMTConfiguration.enabled
|
||||
);
|
||||
const isOpenAmtEnabledQuery = usePublicSettings({
|
||||
select: (settings) =>
|
||||
settings.EnableEdgeComputeFeatures && settings.IsAMTEnabled,
|
||||
});
|
||||
|
||||
const isOpenAMTEnabled = !!isOpenAmtEnabledQuery.data;
|
||||
|
||||
|
|
Loading…
Reference in New Issue