Built by Amanda Liu
- Theme by Brittany Chiang
-
- {githubInfo.stars && githubInfo.forks && (
-
-
-
- {githubInfo.stars.toLocaleString()}
-
-
-
- {githubInfo.forks.toLocaleString()}
-
-
- )}
+ Theme Inspo from Brittany Chiang
);
};
-Footer.propTypes = {
- githubInfo: PropTypes.object,
-};
+// Footer.propTypes = {
+// githubInfo: PropTypes.object,
+// };
export default Footer;
diff --git a/src/components/loader.js b/src/components/loader.js
index 2b65492..641d33d 100644
--- a/src/components/loader.js
+++ b/src/components/loader.js
@@ -3,7 +3,6 @@ import { Helmet } from 'react-helmet';
import PropTypes from 'prop-types';
import anime from 'animejs';
import styled from 'styled-components';
-import { IconLoader } from '@components/icons';
const StyledLoader = styled.div`
${({ theme }) => theme.mixins.flexCenter};
@@ -40,7 +39,13 @@ const StyledLoader = styled.div`
const Loader = ({ finishLoading }) => {
const [isMounted, setIsMounted] = useState(false);
- const animate = () => {
+ useEffect(() => {
+ const timeout = setTimeout(() => setIsMounted(true), 10);
+ animate();
+ return () => clearTimeout(timeout);
+ }, []);
+
+ function animate() {
const loader = anime.timeline({
complete: () => finishLoading(),
});
@@ -74,12 +79,21 @@ const Loader = ({ finishLoading }) => {
opacity: 0,
zIndex: -1,
});
- };
+ }
+
+ // Typewriter effect
+ function typeWriter(text, i) {
+ if (i < text.length) {
+ setText(prevText => prevText + text.charAt(i));
+ i++;
+ setTimeout(() => typeWriter(text, i), 100);
+ }
+ }
+
+ const [text, setText] = useState('');
useEffect(() => {
- const timeout = setTimeout(() => setIsMounted(true), 10);
- animate();
- return () => clearTimeout(timeout);
+ typeWriter('welcome to my site', 0);
}, []);
return (
@@ -87,7 +101,7 @@ const Loader = ({ finishLoading }) => {