import { AlertIcon } from '@primer/octicons-react'; import React from 'react'; import Card from '~/components/Card'; interface NoticeViewProps { title: string; children: React.ReactNode; } export function NoticeView({ children, title }: NoticeViewProps) { return (
{title}
{children}
); } interface ErrorViewProps { children: string; } export function ErrorView({ children }: ErrorViewProps) { const [title, ...rest] = children.split(':'); const formattedMessage = rest.length > 0 ? rest.join(':').trim() : children; return (
{title.trim() ?? 'Error'}
Could not apply changes to the ACL policy:
{formattedMessage}
); }