Skip to content

Commit

Permalink
apply formatter #35
Browse files Browse the repository at this point in the history
  • Loading branch information
ukorvl committed Sep 23, 2023
1 parent 61694d7 commit 98aa0c8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
7 changes: 6 additions & 1 deletion site/src/components/common/FooterAnimationSection/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { ANIMATION_CARD_ALIGNMENT } from 'components/AnimatedDottedContainer'
import ArrowButton from 'components/ArrowButton'
import s from './FooterAnimationSection.module.scss'

type AnimationGetter = (text?: string, href?: string, prefersReducedMotion?: boolean, onClick?: (...args: any[]) => any) => any[]
type AnimationGetter = (
text?: string,
href?: string,
prefersReducedMotion?: boolean,
onClick?: (...args: any[]) => any,
) => any[]

export const getAnimatedItemList: AnimationGetter = (text, href, prefersReducedMotion, onClick) => {
return [
Expand Down
11 changes: 7 additions & 4 deletions site/src/components/common/IntroAnimation/IntroAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import s from './IntroAnimation.module.scss'
import { usePrefersReducedMotion } from 'hooks/usePrefersReduceMotion'
import dynamic from 'next/dynamic'

const AnimatedDottedContainer = dynamic(() => import("components/AnimatedDottedContainer"), { ssr: false });
const AnimatedDottedContainer = dynamic(() => import('components/AnimatedDottedContainer'), { ssr: false })

IntroAnimation.propTypes = {
items: PropTypes.array.isRequired,
Expand Down Expand Up @@ -43,9 +43,12 @@ function IntroAnimation({

useEffect(() => {
scrollToTop().then(disableScroll)
setTimeout(() => {
setVisible(true)
}, prefersReduceMotion ? 0 : 700)
setTimeout(
() => {
setVisible(true)
},
prefersReduceMotion ? 0 : 700,
)

return () => {
enableScroll()
Expand Down
6 changes: 5 additions & 1 deletion site/src/components/pages/Home/Intro/Intro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ const Intro = () => {
{(isVisible: boolean) => <IntroDescriptionWidget isVisible={isVisible} />}
</IntroAnimationWidget>
) : (
<IntroAnimationWidget key='introDefault' className={s.animationWidget} items={getAnimatedItemList(prefersReduceMotion)} />
<IntroAnimationWidget
key='introDefault'
className={s.animationWidget}
items={getAnimatedItemList(prefersReduceMotion)}
/>
)}
<WhiteRectangle className={s.underPatternLine} />
</section>
Expand Down
6 changes: 5 additions & 1 deletion site/src/components/pages/ZkLlvm/Intro/Intro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ const Intro = () => {
)}
</IntroAnimationWidget>
) : (
<IntroAnimationWidget key='introDefault' className={s.animationWidget} items={getAnimatedItemList(prefersReduceMotion)} />
<IntroAnimationWidget
key='introDefault'
className={s.animationWidget}
items={getAnimatedItemList(prefersReduceMotion)}
/>
)}
<WhiteRectangle className={s.underPatternLine} />
</section>
Expand Down

0 comments on commit 98aa0c8

Please sign in to comment.