@@ -7,19 +7,19 @@ import { getIconComponentByName } from '../../../utils/icons-map';
7
7
/**
8
8
* External Dependencies.
9
9
*/
10
- import { isEmpty , isArray } from 'lodash' ;
10
+ import { isEmpty , isArray } from 'lodash' ;
11
11
import Link from 'next/link' ;
12
12
import { useEffect , useState } from 'react' ;
13
13
14
- const Footer = ( { footer} ) => {
14
+ const Footer = ( { footer } ) => {
15
15
16
16
const { copyrightText, footerMenuItems, sidebarOne, sidebarTwo, socialLinks } = footer || { } ;
17
- const [ isMounted , setMount ] = useState ( false ) ;
17
+ const [ isMounted , setMount ] = useState ( false ) ;
18
18
19
19
20
- useEffect ( ( ) => {
21
- setMount ( true ) ;
22
- } , [ ] ) ;
20
+ useEffect ( ( ) => {
21
+ setMount ( true ) ;
22
+ } , [ ] ) ;
23
23
24
24
return (
25
25
< footer className = "footer bg-blue-500 p-6" >
@@ -28,45 +28,46 @@ const Footer = ({footer}) => {
28
28
29
29
{ isMounted ? (
30
30
< >
31
- { /*Widget One*/ }
31
+ { /*Widget One*/ }
32
32
< div className = "my-1 px-1 w-full overflow-hidden sm:w-full lg:w-1/2 xl:w-1/3" >
33
- < div dangerouslySetInnerHTML = { { __html : sanitize ( sidebarOne ) } } />
33
+ < div dangerouslySetInnerHTML = { { __html : sanitize ( sidebarOne ) } } />
34
34
</ div >
35
- { /*Widget Two*/ }
35
+ { /*Widget Two*/ }
36
36
< div className = "my-1 px-1 w-full overflow-hidden sm:w-full lg:w-1/2 xl:w-1/3" >
37
- < div dangerouslySetInnerHTML = { { __html : sanitize ( sidebarTwo ) } } />
37
+ < div dangerouslySetInnerHTML = { { __html : sanitize ( sidebarTwo ) } } />
38
38
</ div >
39
39
</ >
40
- ) : null }
40
+ ) : null }
41
41
42
- { /* Footer Menus*/ }
42
+ { /* Footer Menus*/ }
43
43
< div className = "my-1 px-1 w-full overflow-hidden sm:w-full lg:w-1/2 xl:w-1/3" >
44
- { ! isEmpty ( footerMenuItems ) && isArray ( footerMenuItems ) ? (
44
+ { ! isEmpty ( footerMenuItems ) && isArray ( footerMenuItems ) ? (
45
45
< ul >
46
46
{ footerMenuItems . map ( menuItem => (
47
- < li key = { menuItem ?. ID } >
47
+ < li key = { menuItem ?. ID } >
48
48
< Link href = { getPathNameFromUrl ( menuItem ?. url ?? '' ) || '/' } >
49
- < a > { menuItem ?. title } </ a >
49
+ < a > { menuItem ?. title } </ a >
50
50
</ Link >
51
51
</ li >
52
- ) ) }
52
+ ) ) }
53
53
</ ul >
54
- ) : null }
54
+ ) : null }
55
55
</ div >
56
56
</ div >
57
57
< div className = "mb-8 mt-8 w-full flex flex-wrap" >
58
- { /*Copyright Text*/ }
58
+ { /*Copyright Text*/ }
59
59
< div className = "w-full md:w-1/2 lg:w-1/4 text-white" >
60
60
{ copyrightText ? copyrightText : '© Codeytek Academy 2021' }
61
61
</ div >
62
62
< div className = "w-full lg:w-3/4 flex justify-end" >
63
- { ! isEmpty ( socialLinks ) && isArray ( socialLinks ) ? (
63
+ { ! isEmpty ( socialLinks ) && isArray ( socialLinks ) ? (
64
64
< ul className = "flex item-center mb-0" >
65
65
{ socialLinks . map ( socialLink => (
66
- < li key = { socialLink ?. iconName } className = "no-dots-list mb-0 flex items-center" >
67
- < a href = { socialLink ?. iconUrl || '/' } target = "_blank" title = { socialLink ?. iconName } className = "ml-2 inline-block" >
66
+ < li key = { socialLink ?. iconName } className = "no-dots-list mb-0 flex items-center" >
67
+ < a href = { socialLink ?. iconUrl || '/' } target = "_blank"
68
+ title = { socialLink ?. iconName } className = "ml-2 inline-block" >
68
69
{ getIconComponentByName ( socialLink ?. iconName ) }
69
- < span className = "sr-only" > { socialLink ?. iconName } </ span >
70
+ < span className = "sr-only" > { socialLink ?. iconName } </ span >
70
71
</ a >
71
72
</ li >
72
73
) ) }
@@ -76,7 +77,7 @@ const Footer = ({footer}) => {
76
77
</ div >
77
78
</ div >
78
79
</ footer >
79
- )
80
- }
80
+ ) ;
81
+ } ;
81
82
82
83
export default Footer ;
0 commit comments