Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
actually-fix-tabs-bar
marcin mikołajczak 2021-06-28 19:27:08 +02:00
commit cb37e5311f
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -46,12 +46,14 @@ class AboutPage extends ImmutablePureComponent {
componentDidUpdate(prevProps, prevState) { componentDidUpdate(prevProps, prevState) {
const { locale, match, aboutPages } = this.props; const { locale, match, aboutPages } = this.props;
const { locale: prevLocale, aboutPages: prevAboutPages } = prevProps; const { locale: prevLocale, aboutPages: prevAboutPages } = prevProps;
const { locale: stateLocale } = this.props; const { locale: stateLocale } = this.state;
const { locale: prevStateLocale } = prevState; const { locale: prevStateLocale } = prevState;
const { slug } = match.params; const { slug } = match.params;
const { slug: prevSlug } = prevProps.match.params; const { slug: prevSlug } = prevProps.match.params;
if (locale !== prevLocale) this.setState({ locale }); if (locale !== prevLocale) this.setState({ locale });
if ( if (
slug !== prevSlug || slug !== prevSlug ||
stateLocale !== prevStateLocale || stateLocale !== prevStateLocale ||
@ -88,7 +90,6 @@ class AboutPage extends ImmutablePureComponent {
</ul> </ul>
</div> </div>
); );
console.log(slug, page);
return ( return (
<div className='content'> <div className='content'>