style: profile activity loader (#1858)

This commit is contained in:
Anmol Singh Bhatia 2023-08-14 16:20:53 +05:30 committed by GitHub
parent 77fb50faa4
commit 5e76e03a55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 165 additions and 167 deletions

View File

@ -15,7 +15,7 @@ export const WorkspaceSidebarQuickAction = () => {
}`}
>
<button
className={`flex items-center gap-2 flex-grow rounded flex-shrink-0 py-2 ${
className={`flex items-center gap-2 flex-grow rounded flex-shrink-0 py-1.5 ${
store?.theme?.sidebarCollapsed
? "px-2 hover:bg-custom-sidebar-background-80"
: "px-3 shadow border-[0.5px] border-custom-border-300"
@ -25,7 +25,7 @@ export const WorkspaceSidebarQuickAction = () => {
document.dispatchEvent(e);
}}
>
<Icon iconName="edit_square" className="!text-xl !leading-5 text-custom-sidebar-text-300" />
<Icon iconName="edit_square" className="!text-lg !leading-4 text-custom-sidebar-text-300" />
{!store?.theme?.sidebarCollapsed && <span className="text-sm font-medium">New Issue</span>}
</button>
@ -40,7 +40,7 @@ export const WorkspaceSidebarQuickAction = () => {
document.dispatchEvent(e);
}}
>
<Icon iconName="search" className="!text-xl !leading-5 text-custom-sidebar-text-300" />
<Icon iconName="search" className="!text-lg !leading-4 text-custom-sidebar-text-300" />
</button>
</div>
);

View File

@ -27,17 +27,6 @@ const ProfileActivity = () => {
const { data: userActivity } = useSWR(USER_ACTIVITY, () => userService.getUserActivity());
if (!userActivity) {
return (
<Loader className="space-y-5">
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
</Loader>
);
}
return (
<WorkspaceAuthorizationLayout
breadcrumbs={
@ -56,7 +45,8 @@ const ProfileActivity = () => {
</div>
<SettingsNavbar profilePage />
</div>
{userActivity && userActivity.results.length > 0 && (
{userActivity ? (
userActivity.results.length > 0 ? (
<div>
<ul role="list" className="-mb-4">
{userActivity.results.map((activityItem: any, activityIdx: number) => {
@ -224,6 +214,14 @@ const ProfileActivity = () => {
})}
</ul>
</div>
) : null
) : (
<Loader className="space-y-5">
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
</Loader>
)}
</div>
</WorkspaceAuthorizationLayout>