-
Notifications
You must be signed in to change notification settings - Fork 95
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
Feat/partnership #96
Conversation
Marchand-Nicolas
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. |
There was a problem hiding this 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).
components/UI/box.tsx
Outdated
import React from "react"; | ||
import styles from "../../styles/components/box.module.css"; | ||
|
||
const Box = ({ children }: { children: React.ReactNode }) => { |
There was a problem hiding this comment.
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 ReactNode
au lieu de faire React.ReactNode
components/UI/stats/statElement.tsx
Outdated
import styles from "../../../styles/components/stats.module.css"; | ||
import Box from "../box"; | ||
|
||
const StatElement = ({ name, value }: { name: string; value: string }) => { |
There was a problem hiding this comment.
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
components/UI/stats/stats.tsx
Outdated
const Stats = ({ | ||
title, | ||
stats, | ||
}: { |
There was a problem hiding this comment.
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
components/shapes/crosses.tsx
Outdated
import styles from "../../styles/components/shapes.module.css"; | ||
import Cross from "./cross"; | ||
|
||
const Crosses = ({ |
There was a problem hiding this comment.
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 = ({ |
There was a problem hiding this comment.
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}> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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
components/shapes/crosses.tsx
Outdated
}} | ||
className={styles.side} | ||
> | ||
{Array.from(Array(number).keys()).map((i) => ( |
There was a problem hiding this comment.
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.
components/shapes/crosses.tsx
Outdated
}} | ||
className={styles.side} | ||
> | ||
{Array.from(Array(number).keys()).map((i) => ( |
There was a problem hiding this comment.
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(" ")} |
There was a problem hiding this comment.
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 ?
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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(" ")}> |
There was a problem hiding this comment.
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 && ( |
There was a problem hiding this comment.
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.
components/UI/titles/mainTitle.tsx
Outdated
title: string; | ||
highlighted: string; | ||
subtitle: string; | ||
corner?: string | null; |
There was a problem hiding this comment.
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
components/shapes/dots.tsx
Outdated
import styles from "../../styles/components/shapes.module.css"; | ||
import Dot from "./dot"; | ||
|
||
const Dots = ({ number = 5 }: { number?: number }) => { |
There was a problem hiding this comment.
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
pages/api/get_quests.ts
Outdated
@@ -32,6 +32,7 @@ export default async function handler( | |||
.json({ error: "No quests found" }); | |||
} | |||
} catch (error) { | |||
console.log(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete
pages/partnership.tsx
Outdated
import OnScrollIntoView from "../components/animations/onScrollIntoView"; | ||
|
||
const Partnership: NextPage = () => { | ||
const { View: JediSwapView, play: jediSwapPlay } = useLottie({ |
There was a problem hiding this comment.
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
pages/partnership.tsx
Outdated
<div className={styles.partnersContainer}> | ||
<img src="/partners/braavosLogo.svg" /> | ||
<img src="/partners/zklendLogo.svg" /> | ||
<img src="/partners/SithswapLogo.svg" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming sans majuscule, sithswapLogo
pages/partnership.tsx
Outdated
<img src="/partners/zklendLogo.svg" /> | ||
<img src="/partners/SithswapLogo.svg" /> | ||
<img src="/partners/JEDIswapLogo.svg" /> | ||
<img src="/partners/AVNULogo.svg" /> |
There was a problem hiding this comment.
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
pages/partnership.tsx
Outdated
<CategoryTitle | ||
title="Starknet Quests Lead the Way" | ||
subtitle="Revolutionizing Rewards" | ||
corner={null} |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
6e55ba9
to
70799d9
Compare
70799d9
to
6e55ba9
Compare
There was a problem hiding this 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.
components/UI/steps/stepElement.tsx
Outdated
<h2 key={`step_${index}_subtitle`} className={styles.subtitle}> | ||
{step.subtitle} | ||
</h2>, | ||
].sort(() => (subTitleBefore ? -1 : 1))} |
There was a problem hiding this comment.
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.
components/UI/steps/stepElement.tsx
Outdated
</div> | ||
<div className={styles.overlay}> | ||
{step.overlay ? step.overlay : null} | ||
</div> |
There was a problem hiding this comment.
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
}
There was a problem hiding this comment.
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
components/UI/titles/mainTitle.tsx
Outdated
highlighted, | ||
subtitle, | ||
corner = null, | ||
squares = null, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"; | ||
|
There was a problem hiding this comment.
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
components/shapes/cross.tsx
Outdated
const Cross = () => { | ||
return ( | ||
<svg | ||
className={[styles.shape, styles.corner].join(" ")} |
There was a problem hiding this comment.
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à !
components/shapes/dots.tsx
Outdated
number = 5, | ||
}: { | ||
number?: number; | ||
}) => { |
There was a problem hiding this comment.
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;
})
There was a problem hiding this comment.
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
pages/partnership.tsx
Outdated
import OnScrollIntoView from "../components/animations/onScrollIntoView"; | ||
|
||
const Partnership: NextPage = () => { | ||
const { View: JediSwapBannerLottieView, play: jediSwapBannerLottiePlay } = |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm