feat: useResponsive with device detection on SSR

This commit is contained in:
2026-01-28 21:08:27 -05:00
parent 51f594baa5
commit c82bf47e98
3 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
export function useResponsive() {
const { isMobileOrTablet } = useDevice();
const breakpoints = useBreakpoints(breakpointsTailwind, { ssrWidth: isMobileOrTablet ? 375 : 1024 });
const isDesktop = breakpoints.greaterOrEqual("lg");
return { breakpoints, isDesktop };
}