diff --git a/src/shared/components/Header.vue b/src/shared/components/Header.vue index 5db6aa4..4e4db69 100644 --- a/src/shared/components/Header.vue +++ b/src/shared/components/Header.vue @@ -22,12 +22,10 @@ const { learnStep } = useLearnProgress() const isDark = useDark() -function toggleDark(event: MouseEvent) { - const { clientX: x, clientY: y } = event - const radius = Math.hypot( - Math.max(x, window.innerWidth - x), - Math.max(y, window.innerHeight - y), - ) +function toggleDark() { + const x = window.innerWidth / 2 + const y = window.innerHeight / 2 + const radius = Math.hypot(x, y) if (!document.startViewTransition) { isDark.value = !isDark.value return