Compare commits

...

8 Commits

Author SHA1 Message Date
689ff3cddb Fixed timeout and dists for build and publish
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-30 19:11:28 +07:00
3b28919de1 Upgrade to verison 1.11.0
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-30 17:42:37 +07:00
17a2d11f6a Updated git config 2021-04-30 17:42:03 +07:00
985ea41d64 Updated the version and add build
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-10 18:02:12 +07:00
065bdef4e7 Upgrade to 1.10.8
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-10 17:50:11 +07:00
76be5ed386 Add drone ci
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-10 17:48:14 +07:00
77b1866157 updated new version 2020-10-15 10:23:37 +07:00
3260d16932 updated gitignore 2020-10-15 10:23:22 +07:00
5 changed files with 19 additions and 2 deletions

14
.drone.yml Normal file
View File

@@ -0,0 +1,14 @@
kind: pipeline
type: docker
name: ci
steps:
- name: npm
image: plugins/npm
settings:
username:
from_secret: NPM_USERNAME
password:
from_secret: NPM_PASSWORD
email:
from_secret: NPM_EMAIL

View File

@@ -1,5 +1,7 @@
# React Countdown Hook # React Countdown Hook
[![Build Status](https://dci.osa.cubetiqs.com/api/badges/CUBETIQ/react-use-countdown/status.svg)](https://dci.osa.cubetiqs.com/CUBETIQ/react-use-countdown)
### Installation ### Installation
```shell script ```shell script
# NPM # NPM

1
example/.gitignore vendored
View File

@@ -10,6 +10,7 @@
# production # production
/build /build
/dist
# misc # misc
.DS_Store .DS_Store

View File

@@ -1,6 +1,6 @@
{ {
"name": "@cubetiq/react-use-countdown", "name": "@cubetiq/react-use-countdown",
"version": "1.10.6", "version": "1.11.1",
"description": "React Countdown with trigger", "description": "React Countdown with trigger",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",

View File

@@ -30,7 +30,7 @@ function useCountdown(options?: useCountdownOptions): CountdownHookResult {
const start = (countAsM: number) => { const start = (countAsM: number) => {
setTimeleft(countAsM); setTimeleft(countAsM);
}; };
let varTimeout: number | null = null; let varTimeout: Timeout | null = null;
React.useEffect(() => { React.useEffect(() => {
return () => clearTimeout(varTimeout!); return () => clearTimeout(varTimeout!);