extracted closeNav function to Utils

This commit is contained in:
cnachtigall1991
2021-10-20 18:04:38 +02:00
parent ac1c5eb470
commit ebe2f1d3cc
3 changed files with 14 additions and 15 deletions

View File

@@ -2,6 +2,12 @@ export const setTitle = (title) => {
document.title = `${title} | csgoWTF`
}
export const closeNav = (navSelector) => {
const nav = document.querySelector(navSelector)
if (nav.classList.contains('show'))
nav.classList.remove('show')
}
export const GetWinLoss = (matchResult, teamId) => {
if (matchResult === teamId) {
return 'win'