about summary refs log tree commit diff
path: root/src/view/com/util/layouts/withBreakpoints.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/util/layouts/withBreakpoints.tsx')
-rw-r--r--src/view/com/util/layouts/withBreakpoints.tsx21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/view/com/util/layouts/withBreakpoints.tsx b/src/view/com/util/layouts/withBreakpoints.tsx
deleted file mode 100644
index 71971c604..000000000
--- a/src/view/com/util/layouts/withBreakpoints.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react'
-
-import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
-import {isNative} from '#/platform/detection'
-
-export const withBreakpoints = <P extends object>(
-  Mobile: React.ComponentType<P>,
-  Tablet: React.ComponentType<P>,
-  Desktop: React.ComponentType<P>,
-): React.FC<P> =>
-  function WithBreakpoints(props: P) {
-    const {isMobile, isTabletOrMobile} = useWebMediaQueries()
-
-    if (isMobile || isNative) {
-      return <Mobile {...props} />
-    }
-    if (isTabletOrMobile) {
-      return <Tablet {...props} />
-    }
-    return <Desktop {...props} />
-  }