Merged in chore/remove-unused-env-vars (pull request #2463)

chore: Remove unused env vars and feature toggles

* Remove unused env vars and feature toggles


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-06-30 07:48:05 +00:00
parent bdf66af23d
commit f0def99425
38 changed files with 28 additions and 369 deletions

View File

@@ -9,8 +9,6 @@ import useStickyPositionStore, {
import { debounce } from "@/utils/debounce"
import { useIsLangLive } from "./useIsLangLive"
interface UseStickyPositionProps {
ref?: React.RefObject<HTMLElement | null>
name?: StickyElementNameEnum
@@ -47,7 +45,6 @@ export default function useStickyPosition({
getAllElements,
} = useStickyPositionStore()
const isLangLive = useIsLangLive()
/* Used for Current mobile header since that doesn't use this hook.
*
* Instead, calculate if the mobile header is shown and add the height of
@@ -125,12 +122,10 @@ export default function useStickyPosition({
updateHeights()
// Only do this special handling if we have the current header
if (!isLangLive) {
if (document.body.clientWidth > 950) {
setBaseTopOffset(0)
} else {
setBaseTopOffset(52.41) // The height of current mobile header
}
if (document.body.clientWidth > 950) {
setBaseTopOffset(0)
} else {
setBaseTopOffset(52.41) // The height of current mobile header
}
}, 100)
@@ -144,7 +139,7 @@ export default function useStickyPosition({
resizeObserver.unobserve(document.body)
}
}
}, [updateHeights, isLangLive])
}, [updateHeights])
return {
currentHeight: ref?.current?.offsetHeight || null,