Open LouisSyfer opened 6 months ago
This package merely does not work with Nextjs. I get a blank image.
`import React, { useState, useEffect, useMemo } from "react"; import View360, { EquirectProjection } from "@egjs/react-view360"; import "@egjs/react-view360/css/view360.min.css";
export default function SinglePost(props) {
const Viewer = () => { const projection = useMemo(() => new EquirectProjection({ src: (props.video_path && urlVid) || (props.image_path && urlImg), video: (props.video_path && true) || (props.image_path && false), }), []);
return <View360 projection={projection} className="is-16by9"/>
} return (
</main> </div>
); }`
This package merely does not work with Nextjs. I get a blank image.
`import React, { useState, useEffect, useMemo } from "react"; import View360, { EquirectProjection } from "@egjs/react-view360"; import "@egjs/react-view360/css/view360.min.css";
export default function SinglePost(props) {
const Viewer = () => { const projection = useMemo(() => new EquirectProjection({ src: (props.video_path && urlVid) || (props.image_path && urlImg), video: (props.video_path && true) || (props.image_path && false), }), []);
} return (
); }`