File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ function MyTimer({ expiryTimestamp }) {
2929 type = "button"
3030 onClick = { ( ) => {
3131 // Restarts to 5 minutes timer
32- const t = new Date ( ) ;
33- t . setSeconds ( t . getSeconds ( ) + 300 ) ;
34- restart ( t ) ;
32+ const time = new Date ( ) ;
33+ time . setSeconds ( time . getSeconds ( ) + 300 ) ;
34+ restart ( time ) ;
3535 } }
3636 >
3737 Restart
@@ -41,11 +41,11 @@ function MyTimer({ expiryTimestamp }) {
4141}
4242
4343export default function App ( ) {
44- const t = new Date ( ) ;
45- t . setSeconds ( t . getSeconds ( ) + 600 ) ; // 10 minutes timer
44+ const time = new Date ( ) ;
45+ time . setSeconds ( time . getSeconds ( ) + 600 ) ; // 10 minutes timer
4646 return (
4747 < div >
48- < MyTimer expiryTimestamp = { t } />
48+ < MyTimer expiryTimestamp = { time } />
4949 </ div >
5050 ) ;
5151}
Original file line number Diff line number Diff line change @@ -56,20 +56,20 @@ function MyTimer({ expiryTimestamp }) {
5656 < button onClick= {resume}> Resume< / button>
5757 < button onClick= {() => {
5858 // Restarts to 5 minutes timer
59- const t = new Date ();
60- t .setSeconds (t .getSeconds () + 300 );
61- restart (t )
59+ const time = new Date ();
60+ time .setSeconds (time .getSeconds () + 300 );
61+ restart (time )
6262 }}> Restart< / button>
6363 < / div>
6464 );
6565}
6666
6767export default function App () {
68- const t = new Date ();
69- t .setSeconds (t .getSeconds () + 600 ); // 10 minutes timer
68+ const time = new Date ();
69+ time .setSeconds (time .getSeconds () + 600 ); // 10 minutes timer
7070 return (
7171 < div>
72- < MyTimer expiryTimestamp= {t } / >
72+ < MyTimer expiryTimestamp= {time } / >
7373 < / div>
7474 );
7575}
You can’t perform that action at this time.
0 commit comments