-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact : component file structure refactored
- Loading branch information
whatisyourname0
committed
Jul 29, 2023
1 parent
1c7bd2e
commit f4ef356
Showing
71 changed files
with
371 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
export { useCanvas } from './useCanvas'; | ||
export { useComponentVisible } from './useComponentVisible'; | ||
export { useGoogleAnalytics } from './useGoogleAnalytics'; | ||
export { useHandleAnimationScroll } from './useHandleAnimationScroll'; | ||
export { useHover } from './useHover'; | ||
export { useIdle } from './useIdle'; | ||
export { useIntersectionObserver } from './useIntersectionObserver'; | ||
export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'; | ||
export { useKeyPress } from './useKeyPress'; | ||
export { useLocomotiveScrollPosition } from './useLocomotiveScrollPosition'; | ||
export { useMediaQuery } from './useMediaQuery'; | ||
export { useMount } from './useMount'; | ||
export { useOnScreen } from './useOnScreen'; | ||
export { useScrollPosition } from './useScrollPosition'; | ||
export { useTimeout } from './useTimeout'; | ||
export { useUnmount } from './useUnmount'; | ||
export { useWindowSize } from './useWindowSize'; | ||
export * as useCanvas from './useCanvas'; | ||
export * as useComponentVisible from './useComponentVisible'; | ||
export * as useGoogleAnalytics from './useGoogleAnalytics'; | ||
export * as useHandleAnimationScroll from './useHandleAnimationScroll'; | ||
export * as useHover from './useHover'; | ||
export * as useIdle from './useIdle'; | ||
export * as useIntersectionObserver from './useIntersectionObserver'; | ||
export * as useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect'; | ||
export * as useKeyPress from './useKeyPress'; | ||
export * as useLocomotiveScrollPosition from './useLocomotiveScrollPosition'; | ||
export * as useMediaQuery from './useMediaQuery'; | ||
export * as useMount from './useMount'; | ||
export * as useMousePosition from './useMousePosition'; | ||
export * as useOnScreen from './useOnScreen'; | ||
export * as useScrollPosition from './useScrollPosition'; | ||
export * as useTimeout from './useTimeout'; | ||
export * as useUnmount from './useUnmount'; | ||
export * as useWindowSize from './useWindowSize'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Banner } from './Banner'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { LoadingScreen } from '@components/LoadingScreen'; | ||
import { LocomotiveScrollProvider } from '@context'; | ||
import { TransitionColorContext } from '@context/TransitionColorContext'; | ||
import { useHandleAnimationScroll, useMount } from '@hooks'; | ||
import { useContext, useRef } from 'react'; | ||
import styled, { useTheme } from 'styled-components'; | ||
|
||
import Banner from './Banner/Banner'; | ||
import { GalleryComponent } from './GalleryComponent'; | ||
|
||
function ClubsPage() { | ||
const { handleAnimationStart, handleAnimationComplete } = useHandleAnimationScroll(); | ||
const { transitionColorHandler } = useContext(TransitionColorContext); | ||
const { color } = useTheme(); | ||
const containerRef = useRef(null); | ||
|
||
useMount(() => { | ||
transitionColorHandler(color.yellow); | ||
}); | ||
|
||
return ( | ||
<> | ||
<LocomotiveScrollProvider.Horizontal containerRef={containerRef}> | ||
<Container data-scroll-container ref={containerRef} id="#fixed-element-clubs-container"> | ||
<Banner /> | ||
<GalleryPadding data-scroll-section /> | ||
<GalleryComponent /> | ||
</Container> | ||
</LocomotiveScrollProvider.Horizontal> | ||
<LoadingScreen | ||
handleAnimationStart={handleAnimationStart} | ||
handleAnimationComplete={handleAnimationComplete} | ||
/> | ||
</> | ||
); | ||
} | ||
|
||
export default ClubsPage; | ||
|
||
const Container = styled.main` | ||
width: fit-content; | ||
height: 100vh; | ||
display: flex; | ||
font-family: 'Google Sans', sans-serif; | ||
perspective: 1px; // for locomotive-scroll element disappearance bug fix. | ||
background-color: ${(props) => props.theme.backgroundColor.white}; | ||
${({ theme }) => theme.tablet` | ||
height: calc(var(--vh, 1vh) * 100); | ||
`} | ||
`; | ||
|
||
const GalleryPadding = styled.div` | ||
width: 35vw; | ||
height: 100%; | ||
background: linear-gradient( | ||
to right, | ||
${(props) => props.theme.backgroundColor.white} 0%, | ||
${(props) => props.theme.backgroundColor.black} 100% | ||
); | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as GalleryComponent } from './GalleryComponent'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1 @@ | ||
import { LoadingScreen } from '@components/LoadingScreen'; | ||
import { LocomotiveScrollProvider } from '@context'; | ||
import { TransitionColorContext } from '@context/TransitionColorContext'; | ||
import useHandleAnimationScroll from '@hooks/useHandleAnimationScroll/useHandlerAnimationScroll.js'; | ||
import useMount from '@hooks/useMount/useMount'; | ||
import { useContext, useRef } from 'react'; | ||
import styled, { useTheme } from 'styled-components'; | ||
|
||
import Banner from './Banner'; | ||
import GalleryComponent from './GalleryComponent'; | ||
|
||
function ClubsPage() { | ||
const { handleAnimationStart, handleAnimationComplete } = useHandleAnimationScroll(); | ||
const { transitionColorHandler } = useContext(TransitionColorContext); | ||
const { color } = useTheme(); | ||
const containerRef = useRef(null); | ||
|
||
useMount(() => { | ||
transitionColorHandler(color.yellow); | ||
}); | ||
|
||
return ( | ||
<> | ||
<LocomotiveScrollProvider.Horizontal containerRef={containerRef}> | ||
<Container data-scroll-container ref={containerRef} id="#fixed-element-clubs-container"> | ||
<Banner /> | ||
<GalleryPadding data-scroll-section /> | ||
<GalleryComponent /> | ||
</Container> | ||
</LocomotiveScrollProvider.Horizontal> | ||
<LoadingScreen | ||
handleAnimationStart={handleAnimationStart} | ||
handleAnimationComplete={handleAnimationComplete} | ||
/> | ||
</> | ||
); | ||
} | ||
|
||
export default ClubsPage; | ||
|
||
const Container = styled.main` | ||
width: fit-content; | ||
height: 100vh; | ||
display: flex; | ||
font-family: 'Google Sans', sans-serif; | ||
perspective: 1px; // for locomotive-scroll element disappearance bug fix. | ||
background-color: ${(props) => props.theme.backgroundColor.white}; | ||
${({ theme }) => theme.tablet` | ||
height: calc(var(--vh, 1vh) * 100); | ||
`} | ||
`; | ||
|
||
const GalleryPadding = styled.div` | ||
width: 35vw; | ||
height: 100%; | ||
background: linear-gradient( | ||
to right, | ||
${(props) => props.theme.backgroundColor.white} 0%, | ||
${(props) => props.theme.backgroundColor.black} 100% | ||
); | ||
`; | ||
export { default as ClubsPage } from './ClubsPage'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Banner } from './Banner'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { LoadingScreen } from '@components/LoadingScreen'; | ||
import { LocomotiveScrollProvider } from '@context'; | ||
import { TransitionColorContext } from '@context/TransitionColorContext'; | ||
import { useHandleAnimationScroll, useMount } from '@hooks'; | ||
import { useContext, useRef } from 'react'; | ||
import styled, { useTheme } from 'styled-components'; | ||
|
||
import Banner from './Banner/Banner'; | ||
import FooterSection from './FooterSection/FooterSection'; | ||
import Introduction from './Introduction/Introduction'; | ||
import DevRelSection from './JamSection/DevRel'; | ||
import FSSection from './JamSection/FS'; | ||
import MLSection from './JamSection/ML'; | ||
import MobileSection from './JamSection/Mobile'; | ||
import ServerSection from './JamSection/Server'; | ||
import WebSection from './JamSection/Web'; | ||
import SectionIntro from './SectionIntro/SectionIntro'; | ||
|
||
function DeveloperPage() { | ||
const { handleAnimationStart, handleAnimationComplete } = useHandleAnimationScroll(); | ||
|
||
const { transitionColorHandler } = useContext(TransitionColorContext); | ||
const { color } = useTheme(); | ||
const containerRef = useRef(null); | ||
|
||
useMount(() => { | ||
transitionColorHandler(color.green); | ||
}); | ||
|
||
return ( | ||
<> | ||
<LocomotiveScrollProvider.Vertical containerRef={containerRef}> | ||
<Container data-scroll-container ref={containerRef}> | ||
<Banner /> | ||
<Introduction /> | ||
<SectionIntro /> | ||
<WebSection /> | ||
<ServerSection /> | ||
<MobileSection /> | ||
<MLSection /> | ||
<FSSection /> | ||
<DevRelSection /> | ||
<FooterSection /> | ||
</Container> | ||
</LocomotiveScrollProvider.Vertical> | ||
<LoadingScreen | ||
handleAnimationStart={handleAnimationStart} | ||
handleAnimationComplete={handleAnimationComplete} | ||
/> | ||
</> | ||
); | ||
} | ||
|
||
export default DeveloperPage; | ||
|
||
const Container = styled.main` | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: flex-start; | ||
align-items: center; | ||
font-family: 'Google Sans', sans-serif; | ||
perspective: 1px; // for locomotive-scroll element disappearance bug fix. | ||
background-color: ${(props) => props.theme.backgroundColor.white}; | ||
`; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as FooterSection } from './FooterSection'; |
3 changes: 1 addition & 2 deletions
3
src/pages/Developer/Introduction/index.jsx → ...s/Developer/Introduction/Introduction.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as Jam } from './Jam'; | ||
export { JamList } from './JamList'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Introduction } from './Introduction'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.