File tree Expand file tree Collapse file tree 6 files changed +55
-26
lines changed Expand file tree Collapse file tree 6 files changed +55
-26
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ import { FC } from 'react';
1919import BadgeImage from './BadgeImage' ;
2020import Newsletter from './Newsletter' ;
2121import SocialMedia from './SocialMedia' ;
22+ import { phoneNumber } from '@/config/app' ;
23+ import { getPhoneNumber } from '@/utils/number' ;
2224
2325export interface FooterProps {
2426 pages : IPageListItem [ ] ;
@@ -66,8 +68,34 @@ const Footer: FC<FooterProps> = ({ pages }) => {
6668 >
6769 < Container maxWidth = "xl" >
6870 < Stack spacing = { 4 } >
69- < Stack direction = "row" justifyContent = "space-between" >
70- < Logo />
71+ < Stack
72+ direction = "row"
73+ justifyContent = "space-between"
74+ alignItems = "flex-start"
75+ >
76+ < Stack spacing = { 2 } >
77+ < Logo />
78+ < Stack spacing = { 2 } direction = "row" alignItems = "center" >
79+ < Typography
80+ variant = "body2"
81+ component = { Link }
82+ href = { `tel:${ getPhoneNumber ( phoneNumber ) } ` }
83+ color = "text.primary"
84+ >
85+ { t . rich ( 'footer.support.phoneNumber' , {
86+ span : ( ) => (
87+ < Box component = "span" letterSpacing = { 1.5 } dir = "ltr" >
88+ { phoneNumber }
89+ </ Box >
90+ ) ,
91+ } ) }
92+ </ Typography >
93+ < span > |</ span >
94+ < Typography variant = "body2" color = "text.primary" >
95+ { t ( 'footer.support.customerServiceHours:' ) }
96+ </ Typography >
97+ </ Stack >
98+ </ Stack >
7199 < Button
72100 onClick = { backToTop }
73101 variant = "outlined"
@@ -89,7 +117,7 @@ const Footer: FC<FooterProps> = ({ pages }) => {
89117 </ Stack >
90118
91119 < Stack spacing = { 1 } >
92- < Typography variant = "h6" > لینک های مفید </ Typography >
120+ < Typography variant = "h6" > { t ( 'footer.links.title' ) } </ Typography >
93121 < Stack spacing = { 1 } >
94122 { pages . map ( ( page ) => {
95123 return (
Original file line number Diff line number Diff line change 1- import FilledBale from '@/components/Icons/components/Use/FilledBale' ;
2- import { Email , Instagram , Phone , Telegram } from '@mui/icons-material' ;
1+ import { Instagram , Telegram } from '@mui/icons-material' ;
32import { Stack , Tooltip , Typography } from '@mui/material' ;
43import { useTranslations } from 'next-intl' ;
54import SocialMediaButton from './SocialMediaButton' ;
@@ -9,31 +8,13 @@ const socialMediaButtons = [
98 id : 'instagram' ,
109 title : 'Instagram' ,
1110 icon : < Instagram /> ,
12- link : '# ' ,
11+ link : 'https://instagram.com ' ,
1312 } ,
1413 {
1514 id : 'telegram' ,
1615 title : 'Telegram' ,
1716 icon : < Telegram /> ,
18- link : '#' ,
19- } ,
20- {
21- id : 'bale' ,
22- title : 'Bale' ,
23- icon : < FilledBale /> ,
24- link : '#' ,
25- } ,
26- {
27- id : 'phone' ,
28- title : 'Phone' ,
29- icon : < Phone /> ,
30- link : '#' ,
31- } ,
32- {
33- id : 'email' ,
34- title : 'Email' ,
35- icon : < Email /> ,
36- link : '#' ,
17+ link : 'https://telegram.me/' ,
3718 } ,
3819] ;
3920
@@ -42,7 +23,7 @@ const SocialMedia = () => {
4223
4324 return (
4425 < Stack spacing = { 1 } >
45- < Typography variant = "h6" > { t ( 'footer.links.contactUs ' ) } </ Typography >
26+ < Typography variant = "h6" > { t ( 'footer.socialMedia.stayTuned ' ) } </ Typography >
4627 < Stack direction = "row" spacing = { 1 } >
4728 { socialMediaButtons . map ( ( button ) => {
4829 return (
Original file line number Diff line number Diff line change 11export const protectedRoutes = [ '/profile' , '/checkout' ] ;
22export const PUBLIC_GATEWAY_URL = '/backend' ;
3+ export const phoneNumber = '021 - 66112233' ;
Original file line number Diff line number Diff line change 7676 "submit" : " Submit"
7777 },
7878 "footer" : {
79+ "support" : {
80+ "phoneNumber" : " PhoneNumber <span></span>" ,
81+ "customerServiceHours:" : " Customer Service Hours:"
82+ },
83+ "socialMedia" : {
84+ "stayTuned" : " Stay Tuned!"
85+ },
7986 "links" : {
87+ "title" : " Useful Links" ,
8088 "aboutUs" : " About Us" ,
8189 "contactUs" : " Contact Us"
8290 },
Original file line number Diff line number Diff line change 7272 "submit" : " ثبت"
7373 },
7474 "footer" : {
75+ "support" : {
76+ "phoneNumber" : " تلفن پشتیبانی <span></span>" ,
77+ "customerServiceHours:" : " شنبه تا پنجشنبه ساعت 9 تا 18"
78+ },
79+ "socialMedia" : {
80+ "stayTuned" : " با ما همراه باشید!"
81+ },
7582 "links" : {
83+ "title" : " لینکهای مفید" ,
7684 "aboutUs" : " درباره ما" ,
7785 "contactUs" : " تماس با ما"
7886 },
Original file line number Diff line number Diff line change 1+ export const getPhoneNumber = ( phoneNumber : string ) : string => {
2+ return phoneNumber . replace ( / \D / g, '' ) ;
3+ } ;
You can’t perform that action at this time.
0 commit comments