|
@@ -2,18 +2,18 @@ import React, {useEffect, useState} from 'react';
|
|
import Styles from './Footer.module.css';
|
|
import Styles from './Footer.module.css';
|
|
import {useTranslation} from "react-i18next";
|
|
import {useTranslation} from "react-i18next";
|
|
import eventBus from "../../uitls/EventBus";
|
|
import eventBus from "../../uitls/EventBus";
|
|
-import {CONTACT_US, HOME} from "../../uitls/Constants";
|
|
|
|
|
|
+import {CONTACT_US} from "../../uitls/Constants";
|
|
import {useNavigate} from "react-router-dom";
|
|
import {useNavigate} from "react-router-dom";
|
|
|
|
|
|
// 底部信息栏组件
|
|
// 底部信息栏组件
|
|
const Footer = () => {
|
|
const Footer = () => {
|
|
const {t} = useTranslation();
|
|
const {t} = useTranslation();
|
|
- const [isHome, setHome] = useState(false)
|
|
|
|
|
|
+ const [isShowConnect, setConnect] = useState(false)
|
|
const navigate = useNavigate();
|
|
const navigate = useNavigate();
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
eventBus.on('changeTabEvent', (tab) => {
|
|
eventBus.on('changeTabEvent', (tab) => {
|
|
- setHome(tab === HOME)
|
|
|
|
|
|
+ setConnect(tab !== CONTACT_US)
|
|
console.log("tab", tab)
|
|
console.log("tab", tab)
|
|
});
|
|
});
|
|
|
|
|
|
@@ -34,7 +34,7 @@ const Footer = () => {
|
|
<p className={Styles.content}>{t('footerHelp')}</p>
|
|
<p className={Styles.content}>{t('footerHelp')}</p>
|
|
<p className={Styles.content}>{t('footerEmail')}</p>
|
|
<p className={Styles.content}>{t('footerEmail')}</p>
|
|
<button
|
|
<button
|
|
- style={{display: isHome ? 'flex' : 'none'}}
|
|
|
|
|
|
+ style={{display: isShowConnect ? 'flex' : 'none'}}
|
|
className={Styles.ellipseBtn}
|
|
className={Styles.ellipseBtn}
|
|
onClick={onClick}
|
|
onClick={onClick}
|
|
>
|
|
>
|