Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Make empty state copy for TAC depend on the value of the setting #12419

Merged
merged 4 commits into from
Apr 16, 2024

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Apr 15, 2024

Copy is suggested by David L and not fully signed off by design / product yet, but it is easy to change if it needs to be tweaked.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

@dbkr dbkr added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Apr 15, 2024
Run the whole file or the radix IDs will br wrong 🤦
@dbkr dbkr marked this pull request as ready for review April 15, 2024 13:39
@dbkr dbkr requested a review from a team as a code owner April 15, 2024 13:39
@dbkr dbkr requested review from t3chguy and florianduros April 15, 2024 13:39
@@ -52,6 +53,15 @@ export function ThreadsActivityCentre({ displayButtonLabel }: ThreadsActivityCen
const [open, setOpen] = useState(false);
const roomsAndNotifications = useUnreadThreadRooms(open);
const isReleaseAnnouncementOpen = useIsReleaseAnnouncementOpen("threadsActivityCentre");
const settingTACOnlyNotifs = useSettingValue<boolean>("Notifications.tac_only_notifications");

const emptyCaption = useCallback((): string => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The usage of useCallback seems too much for me in this use case.
A simple ternary/if is enough I think

@dbkr dbkr added this pull request to the merge queue Apr 16, 2024
Merged via the queue into develop with commit 06e0404 Apr 16, 2024
22 checks passed
@dbkr dbkr deleted the dbkr/tac_empty_state_+copy branch April 16, 2024 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants