Fix netify's prerendering service (#546)

If there's an error in netlify's prerendering service,
we don't have access to the log so we have to spin it up locally to
check.

textures was causing a issue on the home page resulting in "Fatal Error"
as the social preview text, not good.

As a bonus I thing I fix FE sentry logging too.
This commit was merged in pull request #546.
This commit is contained in:
Kurt Hutten
2021-10-05 18:52:24 +11:00
committed by GitHub
parent 5efaec4df0
commit aabe682782
5 changed files with 42 additions and 6 deletions

View File

@@ -8,8 +8,8 @@ import {
GizmoViewport,
OrbitControls,
Environment,
useTexture,
} from '@react-three/drei'
import useSafeTexture from 'src/helpers/hooks/useSafeTexture'
import { useEdgeSplit } from 'src/helpers/hooks/useEdgeSplit'
import { Vector3 } from 'three'
import { requestRender } from 'src/helpers/hooks/useIdeState'
@@ -28,7 +28,7 @@ function Asset({ geometry: incomingGeo }) {
: new THREE.EdgesGeometry(incomingGeo, thresholdAngle),
[incomingGeo]
)
const colorMap = useTexture(texture)
const colorMap = useSafeTexture(texture)
if (!incomingGeo) return null
return (