summaryrefslogtreecommitdiff
path: root/src/core/components/views/DesktopView.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/components/views/DesktopView.jsx')
-rw-r--r--src/core/components/views/DesktopView.jsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/components/views/DesktopView.jsx b/src/core/components/views/DesktopView.jsx
new file mode 100644
index 00000000..31a67936
--- /dev/null
+++ b/src/core/components/views/DesktopView.jsx
@@ -0,0 +1,14 @@
+import isMobile from 'is-mobile'
+import { useEffect, useState } from 'react'
+
+const DesktopView = ({ children }) => {
+ const [view, setView] = useState(<></>)
+
+ useEffect(() => {
+ if (!isMobile()) setView(children)
+ }, [children])
+
+ return view
+}
+
+export default DesktopView