Skip to content

Commit 456b2c6

Browse files
committed
use const time instead of t in readme file and App.js
1 parent 25ed228 commit 456b2c6

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

app/App.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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

4343
export 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
}

readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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

6767
export 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
}

0 commit comments

Comments
 (0)