import { theme } from "@prismicio/editor-ui"; import type { PackageManager, Version } from "@slicemachine/manager"; import React from "react"; import { AiFillWarning } from "react-icons/ai"; import { Flex, Text } from "theme-ui"; import { useSliceMachineReleaseNotes } from "@/features/changelog/useSliceMachineReleaseNotes"; import { ReleaseNotesDetails } from "./ReleaseNotesDetails"; import { UpdateCommandBox } from "./UpdateCommandBox"; import { VersionKindLabel } from "./VersionKindLabel"; interface VersionDetailsProps { selectedVersion: Version; packageManager: PackageManager; } export const ReleaseWarning = () => ( Could not fetch release notes.{" "} Find out more on GitHub ); export const VersionDetails: React.FC = ({ selectedVersion, packageManager, }) => { const releaseNotes = useSliceMachineReleaseNotes(selectedVersion.version); return ( {`Version ${selectedVersion.version}`} {!!selectedVersion.kind && ( )} {/* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions */} {releaseNotes?.includes("# Breaking Change") && ( This update includes breaking changes. To update correctly, follow the steps below. )} {releaseNotes !== undefined ? ( ) : ( )} ); };