Fix StatusBadge crash when status is undefined
This commit is contained in:
@@ -28,6 +28,7 @@ interface StatusBadgeProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function StatusBadge({ status, className }: StatusBadgeProps) {
|
export function StatusBadge({ status, className }: StatusBadgeProps) {
|
||||||
|
if (!status) return null;
|
||||||
const style = statusStyles[status] ?? defaultStyle;
|
const style = statusStyles[status] ?? defaultStyle;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user