Move toasts to sonner (#6053)
This commit is contained in:
@@ -3,6 +3,7 @@ import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import { usePopoverState, PopoverDisclosure } from "reakit/Popover";
|
||||
import { toast } from "sonner";
|
||||
import styled from "styled-components";
|
||||
import { s } from "@shared/styles";
|
||||
import { IntegrationType } from "@shared/types";
|
||||
@@ -16,7 +17,6 @@ import ListItem from "~/components/List/Item";
|
||||
import Popover from "~/components/Popover";
|
||||
import Switch from "~/components/Switch";
|
||||
import Text from "~/components/Text";
|
||||
import useToasts from "~/hooks/useToasts";
|
||||
|
||||
type Props = {
|
||||
integration: Integration<IntegrationType.Post>;
|
||||
@@ -25,7 +25,6 @@ type Props = {
|
||||
|
||||
function SlackListItem({ integration, collection }: Props) {
|
||||
const { t } = useTranslation();
|
||||
const { showToast } = useToasts();
|
||||
|
||||
const handleChange = async (ev: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (ev.target.checked) {
|
||||
@@ -38,9 +37,7 @@ function SlackListItem({ integration, collection }: Props) {
|
||||
|
||||
await integration.save();
|
||||
|
||||
showToast(t("Settings saved"), {
|
||||
type: "success",
|
||||
});
|
||||
toast.success(t("Settings saved"));
|
||||
};
|
||||
|
||||
const mapping = {
|
||||
|
||||
Reference in New Issue
Block a user