Skip to content

Commit

Permalink
Cleaned up + tested Parallax.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jaARke committed Oct 31, 2022
1 parent 7ab3cca commit bdc0963
Show file tree
Hide file tree
Showing 6 changed files with 2,496 additions and 1,115 deletions.
82 changes: 63 additions & 19 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"react-quill": "^1.3.5",
"react-router-dom": "^5.3.0",
"react-scripts": "^4.0.3",
"react-scroll-parallax": "^3.3.1",
"react-social-icons": "^5.6.1",
"react-table": "^7.7.0",
"styled-components": "^5.3.3",
Expand Down
11 changes: 5 additions & 6 deletions client/src/features/Parallax.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Parallax } from 'react-scroll-parallax';
import styles from "../pages/Home/HomePage.module.css";

const ParallaxContainer = (speed, component) => (
const ParallaxContainer = ({speed, children}) => {
return (
<Parallax speed={speed}>
<div className={styles.background_video}>
{component}
</div>
{children}
</Parallax>
);
)
};

export default ParallaxContainer;
4 changes: 2 additions & 2 deletions client/src/pages/Home/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ function HomePage() {
{" "} it!
</h1>
</div>
{ParallaxContainer(-3, <HomeYoutube embedId={process.env.REACT_APP_HOME_VIDEO_EMBED_ID} />)}
<HomeYoutube embedId={process.env.REACT_APP_HOME_VIDEO_EMBED_ID} />
<h1 className={styles.h1}>Check out the events coming up this month! </h1>
{ParallaxContainer(-3, <HomeCalendar />)}
<HomeCalendar />
</div>
);
}
Expand Down
86 changes: 85 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bdc0963

Please sign in to comment.