Skip to content

Commit

Permalink
fix: render hero model only in browser
Browse files Browse the repository at this point in the history
  • Loading branch information
jeangovil committed Jun 1, 2023
1 parent 6219112 commit b6a1a19
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
export * from './HeroModel'
import BrowserOnly from '@docusaurus/BrowserOnly'
import React from 'react'
import { HeroModelProps } from './HeroModel'

export const HeroModel: React.FC<HeroModelProps> = (props) => {
return (
<BrowserOnly>
{() => {
const { HeroModel: Model } = require('./HeroModel')

return <Model {...props}></Model>
}}
</BrowserOnly>
)
}

export type { HeroModelProps } from './HeroModel'

0 comments on commit b6a1a19

Please sign in to comment.