Wizard: Update docs after move to new preview

`/preview` is no longer used in url.
This commit is contained in:
regexowl 2024-08-01 12:25:56 +02:00 committed by Klara Simickova
parent 37dfe8584c
commit 933e65d590
7 changed files with 8 additions and 30 deletions

View file

@ -75,8 +75,6 @@ import {
selectRecommendedRepositories,
} from '../../../../store/wizardSlice';
import useDebounce from '../../../../Utilities/useDebounce';
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
import { betaPath } from '../../utilities/betaPath';
type PackageRepository = 'distro' | 'custom' | 'recommended' | '';
@ -514,7 +512,6 @@ const Packages = () => {
};
const NoResultsFound = () => {
const { isBeta } = useGetEnvironment();
if (toggleSourceRepos === RepoToggle.INCLUDED) {
return (
<Tr>
@ -549,7 +546,7 @@ const Packages = () => {
target="_blank"
iconPosition="right"
icon={<ExternalLinkAltIcon />}
href={betaPath(CONTENT_URL, isBeta())}
href={CONTENT_URL}
>
Manage your repositories and popular repositories
</Button>
@ -579,7 +576,7 @@ const Packages = () => {
isInline
component="a"
target="_blank"
href={betaPath(CONTENT_URL, isBeta())}
href={CONTENT_URL}
>
your repositories
</Button>{' '}
@ -594,7 +591,6 @@ const Packages = () => {
};
const RepositoryModal = () => {
const { isBeta } = useGetEnvironment();
return (
<Modal
titleIconVariant="warning"
@ -632,7 +628,7 @@ const Packages = () => {
iconPosition="right"
isInline
icon={<ExternalLinkAltIcon />}
href={betaPath(CONTENT_URL, isBeta())}
href={CONTENT_URL}
>
content services
</Button>{' '}

View file

@ -23,8 +23,6 @@ import {
convertStringToDate,
timestampToDisplayString,
} from '../../../../Utilities/time';
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
import { betaPath } from '../../utilities/betaPath';
const getLastIntrospection = (
repoIntrospections: RepositoryStatusProps['repoIntrospections']
@ -59,7 +57,6 @@ const RepositoriesStatus = ({
repoIntrospections,
repoFailCount,
}: RepositoryStatusProps) => {
const { isBeta } = useGetEnvironment();
if (repoStatus === 'Valid') {
return (
<>
@ -120,7 +117,7 @@ const RepositoriesStatus = ({
iconPosition="right"
isInline
icon={<ExternalLinkAltIcon />}
href={betaPath(CONTENT_URL, isBeta())}
href={CONTENT_URL}
>
Go to Repositories
</Button>

View file

@ -4,11 +4,8 @@ import { Alert, Button } from '@patternfly/react-core';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import { CONTENT_URL } from '../../../../constants';
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
import { betaPath } from '../../utilities/betaPath';
const RepositoryUnavailable = ({ quantity }: { quantity: number }) => {
const { isBeta } = useGetEnvironment();
return (
<Alert
variant="warning"
@ -29,7 +26,7 @@ const RepositoryUnavailable = ({ quantity }: { quantity: number }) => {
iconPosition="right"
isInline
icon={<ExternalLinkAltIcon />}
href={betaPath(CONTENT_URL, isBeta())}
href={CONTENT_URL}
>
Go to Repositories
</Button>

View file

@ -12,8 +12,6 @@ import {
import { RepositoryIcon } from '@patternfly/react-icons';
import { CONTENT_URL } from '../../../../../constants';
import { useGetEnvironment } from '../../../../../Utilities/useGetEnvironment';
import { betaPath } from '../../../utilities/betaPath';
type EmptyProps = {
refetch: () => void;
@ -21,7 +19,6 @@ type EmptyProps = {
};
export default function Empty({ hasFilterValue, refetch }: EmptyProps) {
const { isBeta } = useGetEnvironment();
return (
<EmptyState variant={EmptyStateVariant.lg} data-testid="empty-state">
<EmptyStateHeader
@ -44,7 +41,7 @@ export default function Empty({ hasFilterValue, refetch }: EmptyProps) {
variant="primary"
component="a"
target="_blank"
href={betaPath(CONTENT_URL, isBeta())}
href={CONTENT_URL}
className="pf-u-mr-sm"
>
Go to repositories

View file

@ -11,11 +11,8 @@ import {
selectPackages,
selectRecommendedRepositories,
} from '../../../../store/wizardSlice';
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
import { betaPath } from '../../utilities/betaPath';
const ManageRepositoriesButton = () => {
const { isBeta } = useGetEnvironment();
return (
<Button
component="a"
@ -24,7 +21,7 @@ const ManageRepositoriesButton = () => {
iconPosition="right"
isInline
icon={<ExternalLinkAltIcon />}
href={betaPath(CONTENT_URL, isBeta())}
href={CONTENT_URL}
>
Create and manage repositories here
</Button>

View file

@ -6,11 +6,8 @@ import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import Snapshot from './Snapshot';
import { CONTENT_URL } from '../../../../constants';
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
import { betaPath } from '../../utilities/betaPath';
export default function SnapshotStep() {
const { isBeta } = useGetEnvironment();
return (
<Form>
<Title headingLevel="h1" size="xl">
@ -28,7 +25,7 @@ export default function SnapshotStep() {
iconPosition="right"
isInline
icon={<ExternalLinkAltIcon />}
href={betaPath(CONTENT_URL, isBeta())}
href={CONTENT_URL}
>
Create and manage repositories here
</Button>

View file

@ -1,3 +0,0 @@
export const betaPath = (path: string, beta: boolean) => {
return beta ? `/preview${path}` : path;
};