finish birthday feature

This commit is contained in:
David Ralph
2020-12-01 13:16:13 +00:00
parent 12e7ec8995
commit f60aae6b24
2 changed files with 3 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ export default class Greeting extends React.PureComponent {
// Birthday
const birth = new Date(localStorage.getItem('birthday'));
if (birth.getDate() === now.getDate() && birth.getMonth() === now.getMonth() && birth.getFullYear() !== 1001) message = 'Happy Birthday';
if (localStorage.getItem('birthdayenabled') === 'true' && birth.getDate() === now.getDate() && birth.getMonth() === now.getMonth()) message = 'Happy Birthday';
// Set the state to the greeting string
this.setState({ greeting: `${message}${name}` });