|
| 1 | +import Select from '../../components/Select/Select'; |
| 2 | +import styles from './Footer.module.css'; |
| 3 | +import { languagesMap } from '../../constants/languages'; |
| 4 | + |
| 5 | +const footerLinks = [ |
| 6 | + [ |
| 7 | + { label: 'FAQ', href: '#faq' }, |
| 8 | + { label: 'Help Center', href: '/help' }, |
| 9 | + { label: 'Account', href: '/account' }, |
| 10 | + { label: 'Media Center', href: '/media' }, |
| 11 | + { label: 'Investor Relations', href: '/investors' }, |
| 12 | + { label: 'Jobs', href: '/jobs' }, |
| 13 | + ], |
| 14 | + [ |
| 15 | + { label: 'Netflix Shop', href: '/shop' }, |
| 16 | + { label: 'Redeem Gift Cards', href: '/redeem' }, |
| 17 | + { label: 'Buy Gift Cards', href: '/buy' }, |
| 18 | + { label: 'Ways to Watch', href: '/ways-to-watch' }, |
| 19 | + { label: 'Terms of Use', href: '/terms' }, |
| 20 | + { label: 'Privacy', href: '/privacy' }, |
| 21 | + ], |
| 22 | + [ |
| 23 | + { label: 'Cookie Preferences', href: '/cookies' }, |
| 24 | + { label: 'Corporate Information', href: '/corporate' }, |
| 25 | + { label: 'Contact Us', href: '/contact' }, |
| 26 | + { label: 'Speed Test', href: '/speed-test' }, |
| 27 | + { label: 'Legal Notices', href: '/legal' }, |
| 28 | + { label: 'Only on Netflix', href: '/only-on-netflix' }, |
| 29 | + ], |
| 30 | + [ |
| 31 | + { label: 'Do Not Sell or Share Personal Information', href: '/do-not-sell' }, |
| 32 | + { label: 'Ad Choices', href: '/ad-choices' }, |
| 33 | + ], |
| 34 | +]; |
| 35 | + |
| 36 | +const selectOptions = Object.entries(languagesMap).map(([value, label]) => ({ |
| 37 | + value, |
| 38 | + label, |
| 39 | +})); |
| 40 | +const defaultLanguage = selectOptions.find((option) => option.value === 'en'); |
| 41 | + |
| 42 | +const Footer = () => { |
| 43 | + return ( |
| 44 | + <footer className={styles.footer} aria-labelledby="footer-heading"> |
| 45 | + <div className={styles.container}> |
| 46 | + <div className={styles.topRow}> |
| 47 | + <div className={styles.helpText}> |
| 48 | + <span>Questions? Call </span> |
| 49 | + <a className={styles.phoneLink} href="tel:1-844-505-2993"> |
| 50 | + 1-844-505-2993 |
| 51 | + </a> |
| 52 | + </div> |
| 53 | + </div> |
| 54 | + |
| 55 | + <div className={styles.linksGrid} role="navigation" aria-label="Footer navigation"> |
| 56 | + {footerLinks.map((column, colIndex) => ( |
| 57 | + <ul key={colIndex} className={styles.linkColumn}> |
| 58 | + {column.map((link) => ( |
| 59 | + <li key={link.label} className={styles.linkItem}> |
| 60 | + <a href={link.href ?? '#'} className={styles.link}> |
| 61 | + {link.label} |
| 62 | + </a> |
| 63 | + </li> |
| 64 | + ))} |
| 65 | + </ul> |
| 66 | + ))} |
| 67 | + </div> |
| 68 | + |
| 69 | + <div className={styles.controlsRow}> |
| 70 | + <Select id="footer-language" options={selectOptions} selected={defaultLanguage} /> |
| 71 | + <div className={styles.copyright}> |
| 72 | + <small>© {new Date().getFullYear()} Rediflix, Inc.</small> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + </footer> |
| 77 | + ); |
| 78 | +}; |
| 79 | + |
| 80 | +export default Footer; |
0 commit comments