style: loader for issue details sidebar

This commit is contained in:
Aaryan Khandelwal 2023-09-15 12:40:55 +05:30
parent ed25e09557
commit 057ddf1310

View File

@ -20,6 +20,7 @@ import {
import { ICustomAttributeValueFormData, IIssue } from "types";
// constants
import { CUSTOM_ATTRIBUTES_LIST } from "constants/custom-attributes";
import { Loader } from "components/ui";
type Props = {
issue: IIssue | undefined;
@ -77,6 +78,16 @@ export const SidebarCustomAttributesList: React.FC<Props> = observer(({ issue })
if (!issue || !issue?.entity) return null;
if (!entityAttributes[issue.entity] || !issueAttributeValues?.[issue.id])
return (
<Loader className="space-y-4">
<Loader.Item height="30px" />
<Loader.Item height="30px" />
<Loader.Item height="30px" />
<Loader.Item height="30px" />
</Loader>
);
return (
<div>
{Object.values(entityAttributes?.[issue.entity] ?? {}).map((attribute) => {