refactor[alerts]: Add types to functions that didnt have it

This commit is contained in:
Igor Carvalho 2023-07-20 18:01:06 -03:00
commit 3a055b7411
5 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@ import { SingleAlertComponentType } from "../../../../types/alerts";
export default function SingleAlert({ export default function SingleAlert({
dropItem, dropItem,
removeAlert, removeAlert,
}: SingleAlertComponentType) { }: SingleAlertComponentType): JSX.Element {
const [show, setShow] = useState(true); const [show, setShow] = useState(true);
const type = dropItem.type; const type = dropItem.type;

View file

@ -6,7 +6,7 @@ import { AlertDropdownType } from "../../types/alerts";
import { useOnClickOutside } from "../hooks/useOnClickOutside"; import { useOnClickOutside } from "../hooks/useOnClickOutside";
import SingleAlert from "./components/singleAlertComponent"; import SingleAlert from "./components/singleAlertComponent";
export default function AlertDropdown({}: AlertDropdownType) { export default function AlertDropdown({}: AlertDropdownType): JSX.Element {
const { closePopUp } = useContext(PopUpContext); const { closePopUp } = useContext(PopUpContext);
const componentRef = useRef<HTMLDivElement>(null); const componentRef = useRef<HTMLDivElement>(null);

View file

@ -8,7 +8,7 @@ export default function ErrorAlert({
list = [], list = [],
id, id,
removeAlert, removeAlert,
}: ErrorAlertType) { }: ErrorAlertType): JSX.Element {
const [show, setShow] = useState(true); const [show, setShow] = useState(true);
useEffect(() => { useEffect(() => {
if (show) { if (show) {

View file

@ -9,7 +9,7 @@ export default function NoticeAlert({
link = "", link = "",
id, id,
removeAlert, removeAlert,
}: NoticeAlertType) { }: NoticeAlertType): JSX.Element {
const [show, setShow] = useState(true); const [show, setShow] = useState(true);
useEffect(() => { useEffect(() => {
if (show) { if (show) {

View file

@ -7,7 +7,7 @@ export default function SuccessAlert({
title, title,
id, id,
removeAlert, removeAlert,
}: SuccessAlertType) { }: SuccessAlertType): JSX.Element {
const [show, setShow] = useState(true); const [show, setShow] = useState(true);
useEffect(() => { useEffect(() => {
if (show) { if (show) {