refactor[alerts]: Add types to functions that didnt have it
This commit is contained in:
parent
b5c6b06b3c
commit
3a055b7411
5 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue