From d68685e48fb52923a95bd5f092f1db97ab854442 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Tue, 8 Apr 2025 23:00:27 +0330 Subject: [PATCH] added useRatio --- frontend/composables/global/useRatio.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 frontend/composables/global/useRatio.ts diff --git a/frontend/composables/global/useRatio.ts b/frontend/composables/global/useRatio.ts new file mode 100644 index 0000000..317e691 --- /dev/null +++ b/frontend/composables/global/useRatio.ts @@ -0,0 +1,12 @@ +import { useWindowSize } from "@vueuse/core"; + +export const useRatio = () => { + const isMobile = computed(() => { + const { width: windowWidth } = useWindowSize(); + return windowWidth.value < 1024; + }); + + return { + isMobile, + }; +};