Skip to content

Commit

Permalink
converted all functions to arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCrossCrash committed Jan 22, 2022
1 parent 25e9fca commit 68d59f4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/App.tsx
Expand Up @@ -37,7 +37,7 @@ const CustomText = React.forwardRef<Text, React.ComponentProps<typeof Text>>(
}
)

function Title() {
const Title = () => {
return (
<Box
flexDirection='column'
Expand Down Expand Up @@ -65,7 +65,7 @@ function Title() {
)
}

function BackGrid() {
const BackGrid = () => {
const { scene } = useThree()
useEffect(() => {
scene.fog = new THREE.FogExp2(0, 0.05)
Expand All @@ -82,7 +82,7 @@ function BackGrid() {
)
}

function RotatingObj() {
const RotatingObj = () => {
const ref = useRef<THREE.Mesh>(null!)
useFrame(
({ clock }) =>
Expand All @@ -100,7 +100,7 @@ function RotatingObj() {
)
}

function Page({ onChangePages }: any) {
const Page = ({ onChangePages }: any) => {
const group = useRef<THREE.Group>(null!)
const { size } = useThree()
const [vpWidth, vpHeight] = useAspect(size.width, size.height)
Expand Down Expand Up @@ -288,7 +288,7 @@ function Page({ onChangePages }: any) {
)
}

export default function App() {
const App = () => {
const scrollArea = useRef(null!)
// useEffect(() => void onScroll({ target: scrollArea.current }), [])
const [pages, setPages] = useState(0)
Expand Down Expand Up @@ -332,3 +332,5 @@ export default function App() {
</>
)
}

export default App

0 comments on commit 68d59f4

Please sign in to comment.