1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-26 08:11:17 +02:00

convert footer to fn component

This commit is contained in:
Kushagra Gour
2024-03-22 03:19:59 +05:30
parent c7e523c374
commit 7ef30d689c
2 changed files with 272 additions and 280 deletions

View File

@@ -6,7 +6,7 @@ import { h, Component } from 'preact';
import { MainHeader } from './MainHeader.jsx';
import ContentWrap from './ContentWrap.jsx';
import ContentWrapFiles from './ContentWrapFiles.jsx';
import Footer from './Footer.jsx';
import { Footer } from './Footer.jsx';
import SavedItemPane from './SavedItemPane.jsx';
import AddLibrary from './AddLibrary.jsx';
import Modal from './Modal.jsx';
@@ -1134,7 +1134,7 @@ export default class App extends Component {
return false;
}
proBtnClickHandler() {
if (user?.isPro) {
if (this.state.user?.isPro) {
this.setState({ isProfileModalOpen: true });
trackEvent('ui', 'manageProBtnClick');
} else {
@@ -1708,6 +1708,7 @@ export default class App extends Component {
<Footer
prefs={this.state.prefs}
user={this.state.user}
layoutBtnClickHandler={this.layoutBtnClickHandler.bind(this)}
helpBtnClickHandler={() =>
this.setState({ isHelpModalOpen: true })