Skip to content

Commit

Permalink
fix: remove redundant tooltip in activity refresh button (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
goga-m authored Oct 31, 2023
1 parent 4f40ce6 commit 30edb30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const CollectionNavigation = ({
return t("pages.collections.activities.loading_activities_collection");
}

return t("common.refresh");
return null;
};

return (
Expand All @@ -145,7 +145,10 @@ export const CollectionNavigation = ({
</div>

{selectedTab === "activity" && (
<Tooltip content={updateDisabledReason()}>
<Tooltip
content={updateDisabledReason()}
disabled={!isTruthy(updateDisabledReason())}
>
<div className="py-1">
<Button
icon="Refresh"
Expand All @@ -165,6 +168,7 @@ export const CollectionNavigation = ({
{selectedTab === "activity" && (
<Tooltip
content={updateDisabledReason()}
disabled={!isTruthy(updateDisabledReason())}
touch
>
<div className="mt-6">
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Collections/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const CollectionsView = ({
return <EmptyBlock>{t("pages.collections.activities.ignores_activities")}</EmptyBlock>;
}

if (isTruthy(isLoadingActivity)) {
if (isTruthy(isLoadingActivity) && activities?.paginated.data.length === 0) {
return <EmptyBlock>{t("pages.collections.activities.loading_activities_collection")}</EmptyBlock>;
}

Expand Down

0 comments on commit 30edb30

Please sign in to comment.