@@ -9,24 +9,45 @@ import { ReopenAnalyticsConsentButton } from 'app/components/AnalyticsConsent'
99import { Typography } from '@oasisprotocol/ui-library/src/components/typography'
1010import { Link } from '@oasisprotocol/ui-library/src/components/link'
1111import { cn } from '@oasisprotocol/ui-library/src/lib/utils'
12+ import { socialMedia } from '../../utils/externalLinks'
13+ import telegram from '../DiscoverMore/images/telegram_black.svg'
14+ import twitter from '../DiscoverMore/images/twitter_black.svg'
15+ import discord from '../DiscoverMore/images/discord_black.svg'
16+ import youtube from '../DiscoverMore/images/youtube_black.svg'
17+ import reddit from '../DiscoverMore/images/reddit_black.svg'
18+ import linkedin from '../DiscoverMore/images/linkedin_black.svg'
19+ import { NotebookText , Home } from 'lucide-react'
1220
1321interface FooterProps {
1422 scope ?: SearchScope
1523 mobileSearchAction ?: ReactNode
1624 enableMobileSearch ?: boolean
1725}
1826
27+ type SocialLinkProps = {
28+ label : string
29+ href : string
30+ imgSrc ?: string
31+ img ?: ReactNode
32+ }
33+
34+ const SocialLinkFooter : FC < SocialLinkProps > = ( { label, href, imgSrc } ) => {
35+ return (
36+ < Link href = { href } rel = "noopener noreferrer" target = "_blank" >
37+ { imgSrc && < img src = { imgSrc } alt = { label } className = "h-5 inline-block" /> }
38+ </ Link >
39+ )
40+ }
41+
1942export const Footer : FC < FooterProps > = ( { scope, mobileSearchAction, enableMobileSearch = true } ) => {
2043 const { t } = useTranslation ( )
2144 const { isMobile, isTablet } = useScreenSize ( )
2245 const currentYear = useConstant ( ( ) => new Date ( ) . getFullYear ( ) )
2346 const hasMobileAction = isMobile && mobileSearchAction
2447
2548 return (
26- < footer >
27- < div
28- className = { cn ( 'flex justify-between items-center py-6 sm:px-6' , enableMobileSearch ? 'px-2' : 'px-4' ) }
29- >
49+ < footer className = "flex flex-col py-4 md:pb-4 md:pt-6" >
50+ < div className = { cn ( 'flex justify-between items-center sm:px-0' , enableMobileSearch ? 'px-2' : 'px-4' ) } >
3051 { isTablet ? (
3152 < AppendMobileSearch
3253 scope = { scope }
@@ -44,7 +65,7 @@ export const Footer: FC<FooterProps> = ({ scope, mobileSearchAction, enableMobil
4465 </ AppendMobileSearch >
4566 ) : (
4667 < >
47- < div className = "flex items-center" >
68+ < div className = "flex flex-1 flex-wrap items-center" >
4869 { import . meta. env . REACT_APP_BUILD_SHA && (
4970 < Typography variant = "xsmall" textColor = "muted" >
5071 < Trans
@@ -107,9 +128,67 @@ export const Footer: FC<FooterProps> = ({ scope, mobileSearchAction, enableMobil
107128 </ Typography >
108129 </ div >
109130 </ div >
110- < Typography variant = "xsmall" textColor = "muted" >
111- { t ( 'footer.title' ) } | < ReopenAnalyticsConsentButton /> | { currentYear }
112- </ Typography >
131+ < div className = "flex items-center gap-6 " >
132+ < Typography variant = "xsmall" textColor = "muted" >
133+ { t ( 'footer.title' ) } | < ReopenAnalyticsConsentButton /> | { currentYear }
134+ </ Typography >
135+ < div >
136+ < div className = "h-5 flex items-center gap-4 justify-between" >
137+ { socialMedia . telegram && (
138+ < SocialLinkFooter
139+ label = { t ( 'social.telegram' ) }
140+ href = { socialMedia . telegram }
141+ imgSrc = { telegram }
142+ />
143+ ) }
144+ { socialMedia . twitter && (
145+ < SocialLinkFooter
146+ label = { t ( 'social.twitter' ) }
147+ href = { socialMedia . twitter }
148+ imgSrc = { twitter }
149+ />
150+ ) }
151+ { socialMedia . discord && (
152+ < SocialLinkFooter
153+ label = { t ( 'social.discord' ) }
154+ href = { socialMedia . discord }
155+ imgSrc = { discord }
156+ />
157+ ) }
158+ { socialMedia . youtube && (
159+ < SocialLinkFooter
160+ label = { t ( 'social.youtube' ) }
161+ href = { socialMedia . youtube }
162+ imgSrc = { youtube }
163+ />
164+ ) }
165+ { socialMedia . reddit && (
166+ < SocialLinkFooter label = { t ( 'social.reddit' ) } href = { socialMedia . reddit } imgSrc = { reddit } />
167+ ) }
168+ { socialMedia . linkedin && (
169+ < SocialLinkFooter
170+ label = { t ( 'social.linkedin' ) }
171+ href = { socialMedia . linkedin }
172+ imgSrc = { linkedin }
173+ />
174+ ) }
175+ { socialMedia . docs && (
176+ < SocialLinkFooter
177+ label = { t ( 'social.docs' ) }
178+ href = { socialMedia . docs }
179+ img = { < NotebookText className = "size-5 text-foreground" /> }
180+ />
181+ ) }
182+ { socialMedia . home && (
183+ < SocialLinkFooter
184+ label = { t ( 'social.home' ) }
185+ href = { socialMedia . home }
186+ img = { < Home className = "size-5 text-foreground" /> }
187+ />
188+ ) }
189+ </ div >
190+ </ div >
191+ </ div >
113192 </ >
114193 ) }
115194 </ div >
0 commit comments