|
|
@ -1,7 +1,7 @@ |
|
|
|
import React, { useEffect } from "react"; |
|
|
|
import React, { useEffect } from "react"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
|
|
|
|
|
|
|
|
import DesktopHome from './Desktop'; |
|
|
|
import DesktopHome from "./Desktop"; |
|
|
|
import Portrait from "./Portrait"; |
|
|
|
import Portrait from "./Portrait"; |
|
|
|
import { publicApi } from "../../redux/actions"; |
|
|
|
import { publicApi } from "../../redux/actions"; |
|
|
|
|
|
|
|
|
|
|
@ -9,13 +9,21 @@ function Home({ setHeaderOptions, headerOptions, isMobile }) { |
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
setHeaderOptions(headerOptions); |
|
|
|
setHeaderOptions(headerOptions); |
|
|
|
}, []); |
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
window.scrollTo(0, 0); |
|
|
|
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
|
|
|
|
{isMobile ? ( |
|
|
|
|
|
|
|
<Portrait /> |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
<div className="flex justify-center "> |
|
|
|
|
|
|
|
<DesktopHome /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
isMobile ? <Portrait /> : <div className="flex justify-center"><DesktopHome /></div> |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* <Landscape /> */} |
|
|
|
{/* <Landscape /> */} |
|
|
|
</> |
|
|
|
</> |
|
|
|
); |
|
|
|
); |
|
|
@ -27,7 +35,6 @@ const mapStateToProps = (state) => ({ |
|
|
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
const mapDispatchToProps = { |
|
|
|
setHeaderOptions: publicApi.setHeaderOptions, |
|
|
|
setHeaderOptions: publicApi.setHeaderOptions, |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Home); |
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Home); |
|
|
|