Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextJS Support #127

Open
mostafa-bs23 opened this issue Nov 8, 2023 · 1 comment
Open

NextJS Support #127

mostafa-bs23 opened this issue Nov 8, 2023 · 1 comment

Comments

@mostafa-bs23
Copy link

Can not support NextJS as SSR (Server Side Render). It returns an internal server error.

@glauber-bispo-coopers
Copy link

glauber-bispo-coopers commented Jan 22, 2024

This is because this dep probrably need some frontend dependency, you must import it in a client side component, it can be used in next js in this way, here a example in next 13 that I was testing:

Image360.tsx

"use client";

import { Pannellum } from "pannellum-react";

import React from 'react'

const Image360 = () => {
  return (
    <div>
      <Pannellum
        width="100%"
        height="500px"
        image="/render-360-3dsmax-corona-1.jpg"
        pitch={10}
        yaw={180}
        hfov={110}
        autoLoad
        showZoomCtrl={false}
      />
    </div>
  )
}

export default Image360;

page.tsx

import Image360 from "@/components/Image360";

export default function Home() {
  return (
    <div className="">
      <Image360/>
    </div>
  )
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants