Skip to content

Commit

Permalink
add footer files
Browse files Browse the repository at this point in the history
  • Loading branch information
Chhpearl committed Jul 13, 2022
1 parent 850c627 commit 076a999
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
14 changes: 14 additions & 0 deletions src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import { Layout, Typography} from 'antd';
import { useTranslation } from "react-i18next";

export const Footer: React.FC<any> = () => {
const { t } = useTranslation();
return (
<Layout.Footer>
<Typography.Title level={3} style={{ textAlign: 'center' }}>
{t("footer.detail")}
</Typography.Title>
</Layout.Footer>
)
}
1 change: 1 addition & 0 deletions src/components/Footer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Footer';
3 changes: 2 additions & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './Header';
export * from './SideMenu';
export * from './ProductCollection';
export * from './Carousel';
export * from './Carousel';
export * from './Footer';
4 changes: 2 additions & 2 deletions src/pages/home/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import styles from './HomePage.module.css';
import { Header, SideMenu, Carousel, ProductCollection } from '../../components';
import { Header, SideMenu, Carousel, ProductCollection , Footer} from '../../components';
import { Row, Col, Typography } from 'antd';
import sideImage from '../../assets/images/sider_2019_12-09.png';
import sideImage2 from '../../assets/images/sider_2019_02-04.png';
Expand Down Expand Up @@ -50,7 +50,7 @@ export class HomePageComponent extends React.Component<WithTranslation> {
products={productList[2].touristRoutes}
/>
</div>

<Footer />
</div>
)

Expand Down
1 change: 1 addition & 0 deletions src/redux/language/languageReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const defaultState: LanguageState = {
]
}

// 在模块导入导出之前,将箭头函数指定给变量
let LanguageReducer = (state = defaultState, action: LanguageActionTypes) => {
switch (action.type) {
case CHANGE_LANGUAGE:
Expand Down

0 comments on commit 076a999

Please sign in to comment.