Skip to content

Commit

Permalink
fix: missing dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GloireMutaliko21 committed Jun 28, 2024
1 parent 16c7de5 commit e7ba658
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@
"skey",
"smalltext",
"snyk",
"Sonner",
"sonner",
"Notif",
"stackoverflow",
"statsus",
"statut",
Expand Down
8 changes: 4 additions & 4 deletions apps/web/components/ui/toaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ export function Toaster() {

export function ToastMessageManager() {
const { isTeamMemberJustDeleted, setIsTeamMemberJustDeleted } = useOrganizationTeams();
const [deletedNotifShowm, setDeletedNotifShowm] = useState(false);
const [deletedNotifShown, setDeletedNotifShown] = useState(false);
const t = useTranslations();

useEffect(() => {
let timer: NodeJS.Timeout;
if (isTeamMemberJustDeleted && !deletedNotifShowm) {
if (isTeamMemberJustDeleted && !deletedNotifShown) {
toast.error(t('alerts.ALERT_USER_DELETED_FROM_TEAM'), { duration: 20000 });
timer = setTimeout(() => {
setIsTeamMemberJustDeleted(false);
}, 10000);
setDeletedNotifShowm(true);
setDeletedNotifShown(true);
}

return () => clearTimeout(timer);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [deletedNotifShowm, isTeamMemberJustDeleted, setIsTeamMemberJustDeleted]);
}, [deletedNotifShown, isTeamMemberJustDeleted, setIsTeamMemberJustDeleted]);

return <ToasterMessage richColors visibleToasts={3} />;
}
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"slate-hyperscript": "^0.77.0",
"slate-react": "^0.91.0",
"slate-serializers": "^0.4.0",
"sonner": "^1.5.0",
"string-to-color": "^2.2.2",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.1.8",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23095,6 +23095,11 @@ socks@^2.7.1:
ip-address "^9.0.5"
smart-buffer "^4.2.0"

sonner@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/sonner/-/sonner-1.5.0.tgz#af359f817063318415326b33aab54c5d17c747b7"
integrity sha512-FBjhG/gnnbN6FY0jaNnqZOMmB73R+5IiyYAw8yBj7L54ER7HB3fOSE5OFiQiE2iXWxeXKvg6fIP4LtVppHEdJA==

sort-keys@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
Expand Down

0 comments on commit e7ba658

Please sign in to comment.