Sun-Moon Icon Switch Not Working for Light/Dark Mode
**Describe the bug**
I am trying to create a light and dark  mode on my website. When I set my initial icon to moon and toggles it to sun icon it works but when the initial icon was set to sun and the sun icon get's toggled it does not change to the moon icon.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error...

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

https://user-images.githubusercontent.com/61933245/164387784-8a75f787-edd3-4400-aba3-a94b3bf57582.mov



**Device (please complete the following information):**
 - OS: [e.g. OSX 10.14.2]
 - Browser& amp;Version Mozilla
 - Website Version [e.g. 1.2.1]

**Additional context**
Add any other context about the problem here.
