react-icons/fa APIs
- FaTwitter
- FaGithub
- FaInstagram
- FaLinkedin
- FaTimes
- FaPlus
- FaFacebookF
- FaSearch
- FaYoutube
- FaFacebook
- FaTrash
- FaHeart
- FaLinkedinIn
- FaBars
- FaEnvelope
- FaStar
- FaPlay
- FaHome
- FaEdit
- FaSun
- FaMoon
- FaUser
- FaGithubAlt
- FaFacebookSquare
- FaArrowRight
- FaCheck
- FaTwitterSquare
- FaAngleRight
- FaInfoCircle
- FaMapMarkerAlt
- FaArrowLeft
- FaPen
- FaTrashAlt
- FaShoppingCart
- FaGithubSquare
- FaCheckCircle
- FaDownload
- FaCaretDown
- FaChevronRight
- FaCog
- FaCode
- FaDev
- FaDribbble
- FaLocationArrow
- FaExternalLinkAlt
- FaAngleDown
- FaArrowUp
- FaSignOutAlt
- FaTags
- FaQuoteLeft
- FaPause
- FaChevronLeft
- FaChevronDown
- FaReact
- FaFolderOpen
- FaCircle
- FaAngleLeft
- FaCompass
- FaAlignRight
- FaMinus
- FaBoxOpen
- FaLink
- FaUsers
- FaGoogle
- FaTwitch
- FaRss
- FaSpotify
- FaCrown
- FaLock
- FaCopyright
- FaRegTrashAlt
- FaUserAlt
- FaRegStar
- FaPhone
- FaMapMarkedAlt
- FaRegCircle
- FaVolumeUp
- FaDiscord
- FaUserCircle
- FaList
- FaStackOverflow
- FaFreeCodeCamp
- FaMicrophone
- FaRedo
- FaClipboard
- FaChevronUp
- FaLongArrowAltRight
- FaAngleDoubleRight
- FaKey
- FaCubes
- FaBan
- FaMediumM
- FaPinterest
- FaVideo
- FaDribbbleSquare
- FaComment
- FaBellSlash
- FaRegBuilding
- FaSlack
- FaItunesNote
- FaBox
- FaWonSign
- FaAirbnb
- FaDoorOpen
- FaGlobe
- FaBath
- FaParking
- FaWhatsapp
- FaUserInjured
- FaRegPlusSquare
- FaPlayCircle
- FaPauseCircle
- FaVolumeMute
- FaSpinner
- FaRegLightbulb
- FaCcVisa
- FaCcMastercard
- FaCcPaypal
- FaCcAmazonPay
- FaRegHeart
- FaCartArrowDown
- FaCartPlus
- FaPinterestSquare
- FaPaypal
- FaAmazon
- FaShopify
- FaApple
- FaTruck
- FaUndoAlt
- FaRocketchat
- FaWallet
- FaPinterestP
- FaGooglePlay
- FaCaretUp
- FaFilter
- FaCalendarAlt
- FaCodeBranch
- FaExclamationCircle
- FaEye
- FaOsi
- FaRegEdit
- FaMicrophoneAlt
- FaMicrophoneAltSlash
- FaCogs
- FaEllipsisH
- FaEquals
- FaQrcode
- FaAddressBook
- FaServer
- FaFolder
- FaLongArrowAltLeft
- FaSkype
- FaHandHoldingHeart
- FaRegPaperPlane
- FaRegBookmark
- FaInbox
- FaHamburger
- FaSearchLocation
- FaBirthdayCake
- FaUserGraduate
- FaGoogleDrive
- FaPaperPlane
- FaLockOpen
- FaUserFriends
- FaExchangeAlt
- FaEllipsisV
- FaSortAmountDown
- FaSortAmountUp
- FaCaretSquareRight
- FaCaretSquareLeft
- FaColumns
- FaUndo
- FaQuestionCircle
- FaBloggerB
- FaRedditAlien
- FaCodepen
- FaGitlab
- FaBlogger
- FaCameraRetro
- FaTabletAlt
- FaRegNewspaper
- FaRegCalendarAlt
- FaForward
- FaQuoteRight
- FaVoteYea
- FaShareSquare
- FaBehanceSquare
- FaSignInAlt
- FaSkull
- FaReddit
- FaRegSmileBeam
- FaWindowClose
- FaWindowMinimize
- FaWindowMaximize
- FaPaste
- FaStopwatch
- FaStop
- FaSave
- FaFileExport
- FaHandPointer
- FaFile
- FaMapSigns
- FaClipboardCheck
- FaClock
- FaThList
- FaDumbbell
- FaGuitar
- FaNetworkWired
- FaPuzzlePiece
- FaUserEdit
- FaEyeSlash
- FaPhoneAlt
- FaStickyNote
- FaThumbsUp
- FaThumbsDown
- FaArrowCircleUp
- FaLightbulb
- FaBookOpen
- FaRegSquare
- FaItalic
- FaBold
- FaPencilAlt
- FaSlash
- FaShapes
- FaShip
- FaTree
- FaFilePdf
- FaRegArrowAltCircleRight
- FaFileUpload
- FaKeyboard
- FaBehance
- FaGoodreadsG
- FaProductHunt
- FaXing
- FaBolt
OtherRelated APIs
react-icons/fa#FaClock JavaScript Examples
The following examples show how to use
react-icons/fa#FaClock.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TaskFeedback.js From fokus with GNU General Public License v3.0 | 4 votes |
export function TaskFeedback({ task, time, setInputValid }) {
let [error, setError] = useState(undefined);
useEffect(() => {
let errorGenerated = false;
if (task !== undefined) {
// if time is there, it should be stripped and validated first before the actual task content
let temp = task?.trim().split(" ");
if (temp !== undefined && !isNaN(parseInt(temp[temp.length - 1]))) {
let taskTime = parseInt(temp.pop());
if (taskTime <= 0) {
setError("Hmmm. Time for this task seems weird,no?");
errorGenerated = true;
setInputValid(false);
return;
} else if (taskTime > 120) {
setError("Time should be <120mins for better focus !");
errorGenerated = true;
setInputValid(false);
return;
}
}
temp = temp?.join(" ");
if (temp?.length === 0) {
setError(undefined);
errorGenerated = true;
setInputValid(false);
} else if (temp?.length < 3) {
setError("Task should be atleast 3 characters long.");
errorGenerated = true;
setInputValid(false);
} else if (temp?.length > 100) {
setError("Hey, that's too long. Keep it short and simple.");
errorGenerated = true;
setInputValid(false);
} else {
setError(undefined);
setInputValid(true);
}
}
if (!errorGenerated) {
// will check for error in time only if no error in task
if (time !== undefined && time !== "") {
let numericTime = parseInt(time);
if (numericTime <= 0 || numericTime > 120) {
setError("Time should be between 1-120 mins");
setInputValid(false);
} else {
setError(undefined);
setInputValid(true);
}
}
}
}, [task, time, setInputValid]);
const remainingTaskListTime = useSelector((s) => s.tasks.meta.remainingTaskListTime);
const rTLTObj = getFormattedListTimeSummary(remainingTaskListTime);
let rTLTHours = rTLTObj.hours;
let rTLTMins = rTLTObj.mins;
return (
<TaskFeedbackContainer>
{error === undefined ? (
<RemainingTaskListTimeDiv>
{remainingTaskListTime === 0 ? (
<p>Create New Task</p>
) : (
<>
<FaClock />
<p>list time:</p>
{rTLTHours !== "0" && <span>{rTLTHours}h</span>}
{rTLTMins !== "00" && <span>{rTLTMins}m</span>}
</>
)}
</RemainingTaskListTimeDiv>
) : (
<ErrorMessage>
<p>{error}</p>
</ErrorMessage>
)}
</TaskFeedbackContainer>
);
}