Remove a dep that may have been causing issues

This commit is contained in:
Steve Ruiz 2021-09-03 16:09:54 +01:00
parent d05807bbfb
commit 69462632a5
7 changed files with 11 additions and 15 deletions

View file

@ -28,6 +28,9 @@
"docs": "typedoc --entryPoints src/index.ts"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@radix-ui/react-primitive": "^0.0.15",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.6",
"@types/react": "^17.0.16",
@ -48,13 +51,7 @@
"react-dom": "^17.0.2"
},
"dependencies": {
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@radix-ui/react-primitive": "^0.0.15",
"@typescript-eslint/eslint-plugin": "^4.19.0",
"@typescript-eslint/parser": "^4.19.0",
"deepmerge": "^4.2.2",
"ismobilejs": "^1.1.1",
"react-use-gesture": "^9.1.3"
}
}
}

View file

@ -4,7 +4,6 @@
/* eslint-disable no-redeclare */
import type React from 'react'
import deepmerge from 'deepmerge'
import isMobilePkg from 'ismobilejs'
import { TLBezierCurveSegment, TLBounds, TLBoundsCorner, TLBoundsEdge } from '../types'
import vec from './vec'
import './polyfills'
@ -1665,7 +1664,8 @@ left past the initial left edge) then swap points on that axis.
/* -------------------------------------------------- */
static isMobile() {
return isMobilePkg().any
if (typeof window === 'undefined') return false
return 'ontouchstart' in window || navigator?.maxTouchPoints > 0
}
// via https://github.com/bameyrick/throttle-typescript
@ -1702,6 +1702,7 @@ left past the initial left edge) then swap points on that axis.
* Find whether the current device is a Mac / iOS / iPadOS.
*/
static isDarwin(): boolean {
if (typeof window === 'undefined') return false
return /Mac|iPod|iPhone|iPad/.test(window.navigator.platform)
}

View file

@ -59,9 +59,8 @@
"@radix-ui/react-tooltip": "^0.0.21",
"@stitches/react": "^1.0.0",
"@tldraw/core": "^0.0.57",
"ismobilejs": "^1.1.1",
"perfect-freehand": "^0.5.3",
"react-hotkeys-hook": "^3.4.0",
"rko": "^0.5.19"
}
}
}

View file

@ -1,10 +1,9 @@
import Head from 'next/head'
import dynamic from 'next/dynamic'
const Editor = dynamic(() => import('../components/editor'), { ssr: false })
// import type { GetServerSideProps } from 'next'
// import { getSession } from 'next-auth/client'
const Editor = dynamic(() => import('components/editor'), { ssr: false })
export default function Home(): JSX.Element {
return (
<>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long