diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index 1bf26cd..5e7c6c8 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -1,75 +1,108 @@ -import React from 'react' -import { Link } from 'gatsby' +import React, { useState } from 'react' -// import dcLogo from "../../images/dclogo.png"; - -import { Container, Section } from '../shared' +import { Section } from '../shared' import { SolidButton } from '../shared/styledComponents' import { StyledHeading, StyledDesc, InputStyled, StyledAnchor } from './style' -const anchorStyles = { - color: '#888' +const Footer = () => { + const [email, setEmail] = useState('') + const [emailError, setEmailError] = useState('') + + const handleEmailChange = (e: React.ChangeEvent) => { + const value = e.target.value + setEmail(value) + + if ( + value && + (value.toLowerCase().includes('@gmail.com') || + value.toLowerCase().includes('@googlemail.com')) + ) { + setEmailError('Gmail addresses are not allowed.') + } else { + setEmailError('') + } + } + + const handleSubmit = (e: React.FormEvent) => { + if (emailError) { + e.preventDefault() + } + } + + return ( +
+
+
+ Data Controller + + Data Controller is a product of 4GL Apps, a brand of Bowe IO Ltd, + which is a UK company with a focus on SAS Software,{' '} + Apps, and + Services. + +
+
+ Newsletter +
+
+ + {emailError && ( +
+ {emailError} +
+ )} +
+
+ +
+
+ +
+ Subscribe +
+
+
+ Other Resources + + Visit our educational and fun SASĀ® software quiz{' '} + Sasensei{' '} + and test your knowledge of SAS topics. + +
+
+
+ ) } -const Footer = () => ( -
-
-
- Data Controller - - Data Controller is a product of 4GL Apps, a brand of Bowe IO Ltd, - which is a UK company with a focus on SAS Software,{' '} - Apps, and - Services. - -
-
- Newsletter -
-
- -
-
- -
-
- -
- Subscribe -
-
-
- Other Resources - - Visit our educational and fun SASĀ® software quiz{' '} - Sasensei and - test your knowledge of SAS topics. - -
-
-
-) - export default Footer