MCPcopy Create free account
hub / github.com/CodeWithHarry/Sigma-Web-Dev-Course / delay

Function delay

Video 119/src/App.jsx:15–21  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

13 } = useForm();
14
15 const delay = (d)=>{
16 return new Promise((resolve, reject)=>{
17 setTimeout(() => {
18 resolve()
19 }, d * 1000);
20 })
21 }
22
23 const onSubmit = async (data) => {
24 // await delay(2) // simulating network delay

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected