Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 12 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { useRef } from "react"; |
||
2 | import useToastFunction from "./toastFunction"; |
||
3 | import useToastType from "./toastType"; |
||
4 | |||
5 | function useToast(options = {}) { |
||
6 | const toastRef = useRef(); |
||
7 | const toast = useToastFunction(toastRef); |
||
8 | const toastType = useToastType(toast, options); |
||
9 | return [toastType, toastRef]; |
||
10 | } |
||
11 | |||
12 | export default useToast; |