Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
import { Fragment } from "react";
|
||||
import { Colors } from "~/application/enums/shared/Colors";
|
||||
import SimpleBadge from "~/components/ui/badges/SimpleBadge";
|
||||
import { ApiKeyLogDto } from "../dtos/ApiKeyLogDto";
|
||||
|
||||
export default function ApiCallStatusBadge({ item, underline }: { item: ApiKeyLogDto; underline?: boolean }) {
|
||||
const title = item.status?.toString() ?? "?";
|
||||
const color =
|
||||
item.status === null
|
||||
? Colors.YELLOW
|
||||
: item.status >= 200 && item.status < 300
|
||||
? Colors.GREEN
|
||||
: item.status >= 300 && item.status < 400
|
||||
? Colors.ORANGE
|
||||
: item.status >= 400
|
||||
? Colors.RED
|
||||
: Colors.UNDEFINED;
|
||||
return (
|
||||
<Fragment>
|
||||
<SimpleBadge title={title} color={color} underline={underline} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user