11import React from 'react' ;
22import { Col , Nav , Row } from 'react-bootstrap' ;
33
4+ import { t } from '../../models/Translation' ;
5+
46//
57const ContentContainer : React . FC < { children : React . ReactNode } > = ( {
68 children,
@@ -21,65 +23,95 @@ const ContentContainer: React.FC<{ children: React.ReactNode }> = ({
2123} ;
2224
2325const FooterComponent = ( ) => {
26+ // Use client-side rendering for the copyright text to avoid hydration issues
27+ const [ isMounted , setIsMounted ] = React . useState ( false ) ;
28+
29+ React . useEffect ( ( ) => {
30+ setIsMounted ( true ) ;
31+ } , [ ] ) ;
32+
2433 return (
2534 < footer className = "bg-dark text-light py-4 mt-5" >
2635 < ContentContainer >
2736 < Row >
2837 < Col md = { 4 } className = "mb-3 mb-md-0" >
29- < h5 > Open Library</ h5 >
30- < p >
31- A community-driven library for sharing knowledge and stories.
32- Built with open source. Powered by generosity.
33- </ p >
34- </ Col >
35- < Col md = { 2 } className = "mb-3 mb-md-0" >
36- < h5 > Quick Links</ h5 >
37- < Nav className = "flex-column" >
38- < Nav . Link href = "#home" className = "text-light px-0" >
39- Home
40- </ Nav . Link >
41- < Nav . Link href = "#catalog" className = "text-light px-0" >
42- Catalog
43- </ Nav . Link >
44- < Nav . Link href = "#about" className = "text-light px-0" >
45- About Us
46- </ Nav . Link >
47- < Nav . Link href = "#donate" className = "text-light px-0" >
48- Donate
49- </ Nav . Link >
50- </ Nav >
51- </ Col >
52- < Col md = { 3 } className = "mb-3 mb-md-0" >
53- < h5 > Contact</ h5 >
54- < p className = "mb-1" > Email: info@openlibrary.community</ p >
55- < p > Address: 123 Library Lane, Knowledge City, World</ p >
56- </ Col >
57- < Col md = { 3 } >
58- < h5 > Follow Us</ h5 >
59- < div >
60- < a href = "#facebook" className = "text-light me-3" >
61- Facebook
38+ < h5 > { t ( 'open_library' ) } </ h5 >
39+ < p > { t ( 'footer_description' ) } </ p >
40+ < div className = "mt-2" >
41+ < a href = "#github" className = "text-light me-3" >
42+ GitHub
6243 </ a >
6344 < a href = "#twitter" className = "text-light me-3" >
6445 Twitter
6546 </ a >
66- < a href = "#instagram " className = "text-light me-3" >
67- Instagram
47+ < a href = "#feishu " className = "text-light me-3" >
48+ Feishu
6849 </ a >
69- < a href = "#linkedin " className = "text-light" >
70- Linkedin
50+ < a href = "#instagram " className = "text-light" >
51+ Instagram
7152 </ a >
7253 </ div >
7354 </ Col >
74- </ Row >
75- < Row className = "mt-3" >
76- < Col className = "text-center text-muted" >
77- < small >
78- © { new Date ( ) . getFullYear ( ) } Open Library Community. All
79- Rights Reserved.
80- </ small >
55+ < Col md = { 3 } className = "mb-3 mb-md-0" >
56+ < h5 > { t ( 'quick_links_footer' ) } </ h5 >
57+ < Nav className = "flex-column" >
58+ < Nav . Link href = "/open-library/books" className = "text-light px-0" >
59+ { t ( 'catalog_footer' ) }
60+ </ Nav . Link >
61+ < Nav . Link href = "/open-library/donate" className = "text-light px-0" >
62+ { t ( 'donate_footer' ) }
63+ </ Nav . Link >
64+ < Nav . Link
65+ href = "/open-library/how-to-borrow"
66+ className = "text-light px-0"
67+ >
68+ { t ( 'how_to_borrow' ) }
69+ </ Nav . Link >
70+ < Nav . Link href = "/open-library/about" className = "text-light px-0" >
71+ { t ( 'about_us_footer' ) }
72+ </ Nav . Link >
73+ < Nav . Link href = "/open-library/faq" className = "text-light px-0" >
74+ { t ( 'faq' ) }
75+ </ Nav . Link >
76+ </ Nav >
77+ </ Col >
78+ < Col md = { 5 } >
79+ < h5 > { t ( 'contact' ) } </ h5 >
80+ < p className = "mb-1" > freeCodeCamp Chengdu Community</ p >
81+ < p className = "mb-1" > Chengdu, Sichuan, China</ p >
82+ < p className = "mb-1" > Email: contact@openlibrary.org</ p >
83+ < p > WeChat: FCCChengdu</ p >
8184 </ Col >
8285 </ Row >
86+
87+ < hr
88+ className = "mt-4 mb-3"
89+ style = { { borderColor : 'rgba(255,255,255,0.2)' } }
90+ />
91+
92+ { /* Use a more direct approach with inline styles to ensure visibility */ }
93+ < div
94+ className = "py-2"
95+ style = { {
96+ textAlign : 'center' ,
97+ color : '#6c757d' ,
98+ fontSize : '0.875rem' ,
99+ width : '100%' ,
100+ display : 'block' ,
101+ } }
102+ >
103+ { isMounted ? (
104+ < >
105+ © { new Date ( ) . getFullYear ( ) } { t ( 'open_library' ) } .{ ' ' }
106+ { t ( 'all_rights_reserved' ) }
107+ </ >
108+ ) : (
109+ < >
110+ © { new Date ( ) . getFullYear ( ) } Open Library. All rights
111+ reserved.
112+ </ >
113+ ) }
114+ </ div >
83115 </ ContentContainer >
84116 </ footer >
85117 ) ;
0 commit comments