const HomePage = ({ onPageOpen, history, match, receiveToken }) => {
useEffect(() => {
onPageOpen();
if (match.params.resetToken) receiveToken(match.params.resetToken);
}, []);
return (
<BaseMarkUp history={history}>
<ColumnContainer>
<LeftColumn>
<Explore />
<Tour />
<News />
</LeftColumn>
<RightColumn>
<HostelReviews />
</RightColumn>
</ColumnContainer>
</BaseMarkUp>
);
};
Hello, please I,m a beginner in react. and I need help in knowing how to approach this challenge
in the snippet above, is my homepage.
my goal now is to make only explore and tour components to visible when user is logged out.
so when the users visit the homepage the components will be displayed but when logged in, the components wont be visible.
please I just need steps/guide/advise on how to achieve my intent.
thank you.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…