import { Field, useFormikContext } from "formik"; import FormGroup from "../components/FormGroup"; import { useState } from "react"; import { faEyeSlash, faEye } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; const ChannelFields = () => { useFormikContext(); const [showPwd, setShowPwd] = useState(false); return (
setShowPwd((s) => !s)} icon={showPwd ? faEyeSlash : faEye} />
); }; export default ChannelFields;