Skip to content

Commit

Permalink
🪲 fix: home animation on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquepw committed Mar 23, 2020
1 parent 8eee26a commit f3dd1e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const Home: FC = () => {
useEffect(() => {
const tl = gsap.timeline();

// prevents flashing
gsap.to('#home', 0, { css: { visibility: 'visible' } });

tl.from('#title span', 2, {
y: '100%',
ease: 'power3.out',
Expand Down
3 changes: 3 additions & 0 deletions src/components/Home/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const Container = styled(section)`
align-items: center;
justify-content: space-between;
visibility: hidden;
div:first-of-type {
p,
h1 {
Expand All @@ -34,6 +36,7 @@ export const Container = styled(section)`
div:nth-of-type(2) {
position: relative;
overflow: hidden;
height: 100vh;
width: 40%;
Expand Down

0 comments on commit f3dd1e0

Please sign in to comment.