src: Resolve problems ater updating API

'centos-8' was dropped from Distributions, causing a few problems. This resolves them.
This commit is contained in:
regexowl 2024-07-30 14:30:24 +02:00 committed by Ondřej Ezr
parent 434c90a6b8
commit 9a1d348a77
4 changed files with 9 additions and 3 deletions

View file

@ -19,6 +19,7 @@ import {
BlueprintItem,
useGetBlueprintsQuery,
useGetBlueprintComposesQuery,
Distributions,
} from '../../store/imageBuilderApi';
import { BlueprintActionsMenu } from '../Blueprints/BlueprintActionsMenu';
import BlueprintVersionFilter from '../Blueprints/BlueprintVersionFilter';
@ -96,7 +97,10 @@ const ImagesTableToolbar: React.FC<imagesTableToolbarProps> = ({
const isBlueprintDistroCentos8 = () => {
if (isSuccessBlueprintsCompose) {
return blueprintsComposes.data[0].request.distribution === 'centos-8';
return (
blueprintsComposes.data[0].request.distribution ===
('centos-8' as Distributions)
);
}
};

View file

@ -24,6 +24,7 @@ const Release = ({ release }: ReleaseProps) => {
'rhel-92': 'RHEL 9.2',
'rhel-93': 'RHEL 9.3',
'rhel-94': 'RHEL 9.4',
'rhel-10-nightly': 'RHEL 10',
'centos-8': 'CentOS Stream 8',
'centos-9': 'CentOS Stream 9',
'centos-10': 'CentOS Stream 10',