alvarotrigo / react-fullpage

Official React.js wrapper for fullPage.js https://alvarotrigo.com/react-fullpage/
GNU General Public License v3.0
1.29k stars 178 forks source link

v3 scrollHorizontally.min.js not work for my next.js project #342

Closed ato-m-a closed 2 years ago

ato-m-a commented 2 years ago

this is my index.tsx.

import { Page } from '../types/page';
import ReactFullpage from '@fullpage/react-fullpage';

/* layout */
import AppLayout from '../layout';

/* section components */
import Sections from '../components/section';

const Home: Page = () => {
  const pluginWrapper = () => {
    require('../public/js/fullpage.scrollHorizontally.min');
  }

  return (
    <main className="main">
      <ReactFullpage
        pluginWrapper={pluginWrapper}
        licenseKey={process.env.NEXT_PUBLIC_FP_LICENSE}
        scrollHorizontallyKey={process.env.NEXT_PUBLIC_FP_EXTENSION_LICENSE}
        scrollHorizontally={true}
        scrollingSpeed={1000}
        render={({ state, fullpageApi }) => {
          return (
            <ReactFullpage.Wrapper>
              <Sections />
            </ReactFullpage.Wrapper>
          )
        }}
      />
    </main>
  )
};

Home.layout = AppLayout;

export default Home;

when scroll, there's an error with 'TypeError: t is not a function'

I downloaded fullpage.scrollHorizontally.min.js from my email download link 'for-fullpage-v3' after bought scrollHorizontally license there was four items (example-scroll-horizontally.html, fullpage.scrollHorizontally.min.js, How to use it.html, for-fullpage-v3.zip) which one is correct file? am I downloaded wrong file?

ato-m-a commented 2 years ago

just downloaded wrong file. I had to download fullpage.scrollHorizontally.min.js.

alvarotrigo commented 2 years ago

Glad you managed to figure it out! ;)