dapoadedire / astro-pic-of-the-day

Local variable name shadows variable in outer scope JS-0123
Bug risk
Minor
2 occurrences in this check
'currentDate' is already declared in the upper scope on line 1 column 14
22};
23
24export const generateRandomDate = () => {
25  const currentDate = new Date();26  const startDate = new Date(1995, 6, 16);
27  const diffTime = currentDate - startDate;
28  const randTime = Math.random() * diffTime;
'date' is already declared in the upper scope on line 21 column 10
31    <form 
32    onSubmit={(e) => {
33      e.preventDefault();
34      const date = e.target.date.value;35      setDate(date);
36    }}
37    >