-// Try to cache a little bit window.innerWidth
-let windowInnerWidth = window.innerWidth
-// setInterval(() => windowInnerWidth = window.innerWidth, 500)
-
-function isInSmallView () {
- return windowInnerWidth < 600
-}
-
-function isInMobileView () {
- return windowInnerWidth < 500
+function removeElementFromArray <T> (arr: T[], elem: T) {
+ const index = arr.indexOf(elem)
+ if (index !== -1) arr.splice(index, 1)