Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wen's movie site #51

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

Wen's movie site #51

wants to merge 34 commits into from

Conversation

wwenzz
Copy link

@wwenzz wwenzz commented Apr 6, 2024

Netlify link

https://popcorn-movie-hub.netlify.app/

Collaborators

[wwenzz]

wwenzz and others added 30 commits April 2, 2024 16:08
Copy link

@linda-f linda-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very well done! Neatly ordered and DRY code - we like 🥇 !
It feels like you thought about error handling and loading states throughout the code.
// Martin, Linda

@@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/src/assets/cinema.png" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Popcorn Icon 🍿 !
//Martin, Linda

<BrowserRouter>
<Routes>
<Route path="/" element={<Home />}>
<Route index element={<Navigate replace to="browser" />} />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool that you use navigate here. We didn't do that. Great inspiration!
// Martin, Linda

import styles from "../styling/Category.module.css";
import PropTypes from "prop-types";

const ListTypes = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to use an array for the different endpoints.
// Martin, Linda

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why PascalCase and not camelCase? 👀

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's becuz the the variable is const and never gonna change. But maybe my impression was wrong, should we still use camelCase in this case @HIPPIEKICK ?

import { useEffect, useRef } from "react";
import PropTypes from "prop-types";

const LoadImage = ({ src, alt, className }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a tutorial pls 😄 because we don't know how it works exactly.
// Martin, Linda

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too 😉

.finally(() => setIsLoading(false));
}, [searchParams]);

const changePage = e => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would have liked to implement it too if we had time. Nice solution! 💯
//Martin, Linda

font-weight: 500;
}

.back:hover {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elegant solution to use the gap property to animate the hover effect.
// Martin, Linda

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done Wen! Cool to see that you made this project your own. It looks super and has some really nice extra features. Be proud ✨

import styles from "../styling/Category.module.css";
import PropTypes from "prop-types";

const ListTypes = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree!

import styles from "../styling/Category.module.css";
import PropTypes from "prop-types";

const ListTypes = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why PascalCase and not camelCase? 👀

Comment on lines +18 to +20
className={({ isActive }) =>
isActive && category === listType.endpoint
? `${styles.categoryLink} ${styles.active}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genius!

Comment on lines +10 to +14
<Lottie
className={styles.animation}
animationData={color === "pink" ? errorPink : errorBlack}
loop={false}
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice Lottie animations you've found!

import { useEffect, useRef } from "react";
import PropTypes from "prop-types";

const LoadImage = ({ src, alt, className }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too 😉

Comment on lines 26 to 35
<>
<img
ref={imgRef}
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjYGBg+A8AAQQBAHAgZQsAAAAASUVORK5CYII="
data-src={src}
alt={alt}
loading="lazy"
className={className}
/>
</>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice with lazy loading and that you found use for the useRef hook 🔥 Do you need the extra fragment though? 👀

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right I remove the extra fragment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice extra feature! ⭐

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And nicely solved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another cool addition to your project, but make sure to fix the mobile view so that it's responsive too 😊

Remove loading="lazy" attribute to make it fully listen to the observer and remove the extra fragment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants