Skip to content

Conversation

@valentinbeggi
Copy link
Owner

No description provided.

import { success } from '@libs/response';

export const main: APIGatewayProxyHandler = async event => {
console.log(event);

Choose a reason for hiding this comment

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

tu peux retirer le console.log


export const main: APIGatewayProxyHandler = async (event) => {
/*
La fonction doit générer 1 virus si un id est passé en query param

Choose a reason for hiding this comment

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

de base les commentaires, c'est pas ouf, mieux vaut les retirer.
Si le code a besoin de commentaires, c'est qu'il n'est pas assez découpé ou que le nom des variables n'est pas assez clair :)

La fonction doit générer 1 virus si un id est passé en query param
Sinon elle en génère 4
*/
let viruses = [{}]

Choose a reason for hiding this comment

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

initialise le seulement avec une liste vide non ?
et type ton tableau, ex: let viruses: Virus[] = [] où Virus est un type {id: string}

]);
const [viruses, setViruses] = useState<VirusProps[]>([]);

useAsync(async (id = 'TEST') => {

Choose a reason for hiding this comment

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

faudra qu'on reparle ensemble en live de tout ça :) j'ai besoin d'un peu de contexte

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