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

Feat/partnership #96

Merged
merged 26 commits into from
Jul 17, 2023
Merged

Feat/partnership #96

merged 26 commits into from
Jul 17, 2023

Conversation

Marchand-Nicolas
Copy link
Collaborator

image
image
image

@vercel
Copy link

vercel bot commented Jul 13, 2023

@Marchand-Nicolas is attempting to deploy a commit to the StarknetID Team on Vercel.

To accomplish this, @Marchand-Nicolas needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

Copy link
Contributor

@fricoben fricoben left a comment

Choose a reason for hiding this comment

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

Bonne PR ! Il me faut plus de rigueur sur les types et de la simplification sur la gestion de ton CSS qui me parait bcp trop complexe (tu utilises trop de logique avec des class dynamique alors que tu devrais utiliser les fonctionnalités de css directement pour ça).

import React from "react";
import styles from "../../styles/components/box.module.css";

const Box = ({ children }: { children: React.ReactNode }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nope ici tu dois definir un type Box et l'utiliser derrière.

Tous les autres composants ont été crées de cette manière tu peux prendre l'exemple de reward.ts.

Ici ça donnerait

type RewardProps = {
  children: ReactNode
};

const Box: FunctionComponent<BoxProps> = ({
  children,
}) => {

De plus au niveau du type tu peux importer ReactNodeau lieu de faire React.ReactNode

import styles from "../../../styles/components/stats.module.css";
import Box from "../box";

const StatElement = ({ name, value }: { name: string; value: string }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

meme chose il me faut un type

const Stats = ({
title,
stats,
}: {
Copy link
Contributor

Choose a reason for hiding this comment

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

meme chose il me faut un type

import styles from "../../styles/components/shapes.module.css";
import Cross from "./cross";

const Crosses = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

meme chose il me faut un type

import React from "react";
import { useInView } from "react-intersection-observer";
import styles from "../../styles/components/animations.module.css";
const OnScrollIntoView = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

meme chose il me faut un type + saute une ligne

title="They worked with us"
corner={null}
/>
<div className={styles.partnersContainer}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Je pense que y'a du css à changer ici vu les commentaires que je t'ai fait sur discord

pages/index.tsx Outdated
@@ -73,6 +76,44 @@ const Quests: NextPage = () => {
<QuestsSkeleton />
)}
</div>
<section>
Copy link
Contributor

Choose a reason for hiding this comment

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

A mettre dans un composant à part. (ce composant ne se trouvera pas dans un le folder /UI car on l'utilisera seulement ici mais c'est à mon avis plus clean

}}
className={styles.side}
>
{Array.from(Array(number).keys()).map((i) => (
Copy link
Contributor

Choose a reason for hiding this comment

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

trop compliqué ici essaye de simplifier.

}}
className={styles.side}
>
{Array.from(Array(number).keys()).map((i) => (
Copy link
Contributor

Choose a reason for hiding this comment

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

Pareil

styles.onScrollIntoView,
styles[animation],
inView ? styles.active : "",
].join(" ")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Pourquoi la class est si grande et complexe ?

@vercel
Copy link

vercel bot commented Jul 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
goerli-starknet-quest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2023 2:47pm
starknet-quest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2023 2:47pm

Copy link
Contributor

@fricoben fricoben left a comment

Choose a reason for hiding this comment

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

Good ! Encore quelques trucs à changer.

return (
<div className={styles.container}>
{corner && (
<div className={[styles.corner, styles[corner]].join(" ")}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok je vois donc là ici pour moi tu dois typer le corner de manière à ce qu'on comprenne que ce n'est pas une string mais un type Corner = bottomRight | bottomLeft | topRight | topLeft

de cette manière on comprend à quoi ça sert.

<Corner />
</div>
)}
{squares && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Pareil sur le type de square.

title: string;
highlighted: string;
subtitle: string;
corner?: string | null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Pareil ici et pour la props squares

import styles from "../../styles/components/shapes.module.css";
import Dot from "./dot";

const Dots = ({ number = 5 }: { number?: number }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Type ici pareil que la dernière fois

@@ -32,6 +32,7 @@ export default async function handler(
.json({ error: "No quests found" });
}
} catch (error) {
console.log(error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete

import OnScrollIntoView from "../components/animations/onScrollIntoView";

const Partnership: NextPage = () => {
const { View: JediSwapView, play: jediSwapPlay } = useLottie({
Copy link
Contributor

Choose a reason for hiding this comment

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

JediSwap c'est pas un bon naming tu peux dire que c'est une illustration ou un visuel ou un media mais partout ou tu met jediswap moi je suis perdu

<div className={styles.partnersContainer}>
<img src="/partners/braavosLogo.svg" />
<img src="/partners/zklendLogo.svg" />
<img src="/partners/SithswapLogo.svg" />
Copy link
Contributor

Choose a reason for hiding this comment

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

naming sans majuscule, sithswapLogo

<img src="/partners/zklendLogo.svg" />
<img src="/partners/SithswapLogo.svg" />
<img src="/partners/JEDIswapLogo.svg" />
<img src="/partners/AVNULogo.svg" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Pareil ici pas de majuscule

<CategoryTitle
title="Starknet Quests Lead the Way"
subtitle="Revolutionizing Rewards"
corner={null}
Copy link
Contributor

Choose a reason for hiding this comment

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

Pas de ça null, autant juste ne pas le définir et mettre une valeur de base dans le composant

title: string;
subtitle: string;
corner?: string | null;
squares?: string | null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Pas de null, y'a déjà undefined avec le ?: qui fait le taff

Copy link
Contributor

@fricoben fricoben left a comment

Choose a reason for hiding this comment

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

Almost there ! Just some few things to clean.

<h2 key={`step_${index}_subtitle`} className={styles.subtitle}>
{step.subtitle}
</h2>,
].sort(() => (subTitleBefore ? -1 : 1))}
Copy link
Contributor

Choose a reason for hiding this comment

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

Pourquoi cette logique ? C'est trop compliqué encore selon moi. Essayes de penser à qlq chose de plus simple dans le css notamment.

</div>
<div className={styles.overlay}>
{step.overlay ? step.overlay : null}
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

{   step.overlay  ?     

<div className={styles.overlay}>
            step.overlay
          </div> : null
}

Copy link
Contributor

Choose a reason for hiding this comment

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

C'est mieux ça nous fait une div en moins

highlighted,
subtitle,
corner = null,
squares = null,
Copy link
Contributor

Choose a reason for hiding this comment

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

= null ne sert à rien.

Ce = est là pour dire si undefined je met quoi comme valeur, donc la si undefined tu met une valeur par defaut et de cette manière tu peux delete corner &&et squares &&.

Si tu veux ne pas en avoir autant ne pas mettre le composant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah oui pardon, j'avais enlevé de l'autre composant, mais apparemment j'ai oublié celui ci

import Steps from "../../UI/steps/steps";
import CategoryTitle from "../../UI/titles/categoryTitle";
import Crosses from "../../shapes/crosses";

Copy link
Contributor

Choose a reason for hiding this comment

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

Ne pas sauter de ligne ici

const Cross = () => {
return (
<svg
className={[styles.shape, styles.corner].join(" ")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Au lieu d'utiliser .join("") il vaut mieux utiliser className={${styles.shape} ${styles.corner}}

Je trouve ça plus clean tu en penses quoi ? Si toi aussi let's go changer tous tes join("") de cette manière là !

number = 5,
}: {
number?: number;
}) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need ?

: {
  number?: number;
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah mince, j'ai oublié de suppr ça aussi

import OnScrollIntoView from "../components/animations/onScrollIntoView";

const Partnership: NextPage = () => {
const { View: JediSwapBannerLottieView, play: jediSwapBannerLottiePlay } =
Copy link
Contributor

Choose a reason for hiding this comment

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

Ici tu as dans ton naming JediSwapBannerLottieView et jediSwapBannerLottiePlay

Le premier ne devrait pas avoir de majuscule pour rester cohérent dans le naming

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

J'ai repris le naming de la lib (de base View et play, y'a une maj sur le premier je suppose car c'est un élément de rendu, un peu comme un component). Je fixe ça

Copy link
Contributor

@fricoben fricoben left a comment

Choose a reason for hiding this comment

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

Lgtm

@fricoben fricoben merged commit 401536e into testnet Jul 17, 2023
2 checks passed
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.

2 participants