twelve-of-code-official / website

The source code for the Twelve of Code website
https://mesure.x10.mx/twelve-of-code
GNU General Public License v3.0
0 stars 0 forks source link

Clicking on years doesn't change the hash #119

Closed BeepBot99 closed 7 months ago

BeepBot99 commented 7 months ago

What happened?

Clicking on months and challenges changes the hash to the correct one, but clicking on a year does nothing.

What did you expect to happen?

It changes the hash to the correct hash when clicking on a year

What page was this on?

Twelve of Code

What browser(s) were you experiencing this on?

Google Chrome (desktop), Other (Please specify)

Enter logs

No response

Other notes

No response

Mesure73L commented 7 months ago

I will look into it, it worked before merging, we probably accidentally removed the code while resolving the conflicts.

Mesure73L commented 7 months ago

I fixed the problem, we used the wrong createDOMYears() or some part of it when resolving the conflicts.

Explanation

Lines 470-472 had this code:

yearElement.addEventListener("click", () => {
    yearSelect(year);
});

What I did is I changed yearSelect(year) to yearSelect(year, true) to make it change the hash.


This is still not completed yet as I found another bug with the month selector. I will create a pull request once it's done.