Skip to the content

Capsid menu

app/components/admin/live-notice.tsx

19 lines and 1 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.

Functions

The functions of live-notice.tsx
FunctionLinesComplexityCoveredCRAPMutation
LiveNotice6 to 193No data: no coverage report in this mapNo data: no coverage report in this mapNo data: no mutants in this code

Imports

It imports no other module of this repo. Imported by app/components/admin/copy-button.tsx, app/components/admin/media-inspector.tsx, app/routes/admin.media._index.tsx.

Source

/**
 * An action's result, in two regions that are in the document before any result arrives: a region
 * inserted together with its text is often never announced. A refusal or failure goes in the alert
 * region, so it interrupts; everything else is polite.
 */
export function LiveNotice({
  status,
  alert,
}: {
  status?: React.ReactNode;
  alert?: React.ReactNode;
}) {
  return (
    <>
      <div role="status">{status ? <p>{status}</p> : null}</div>
      <div role="alert">{alert ? <p>{alert}</p> : null}</div>
    </>
  );
}