-
Notifications
You must be signed in to change notification settings - Fork 5
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
[App] Add presences list #186
Conversation
✅ Deploy Preview for coderdojobraga-blog canceled.
|
✅ Deploy Preview for coderdojobraga-web canceled.
|
✅ Deploy Preview for coderdojobraga-maintenance canceled.
|
✅ Deploy Preview for coderdojobraga-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Format your code with npm run lint
if you haven't done so already.
Don't worry about the link checker action failing, we are fixing it in another PR
type Event = { | ||
id: string; | ||
title: string; | ||
location_id: string; | ||
}; | ||
|
||
type Lecture = { | ||
id: string; | ||
event: Event; | ||
mentor: { | ||
id: string; | ||
first_name: string; | ||
last_name: string; | ||
photo: string; | ||
}; | ||
ninja: { | ||
id: string; | ||
first_name: string; | ||
last_name: string; | ||
photo: string; | ||
}; | ||
summary: string; | ||
notes: string; | ||
attendance: 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.
This type definitions are more generic than this page. I think we can move them to the bokkenjs
package.
useEffect(() => { | ||
generateData(); | ||
}, [selectedLectures]); | ||
console.log(selectedLectures); |
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.
Remove this print :)
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.
When I finish editing a given session, and then move to a different one and back to the one I just edited, the changes are not being reflected. I believe it is because you are not updating your local copy of the lecture after you save it.
Also rebase with main
git rebase origin/main
git push -f # Only force push when strictly necessary :)
That should fix the Link Checker action
api | ||
.listEvents() | ||
.then((response: any) => setEvents(response.data)) | ||
.catch(() => {}); |
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.
Add a notification for this error. The worst thing you can do is having the request fail silently.
api | ||
.getLocations() | ||
.then((response: any) => setLocations(response.data)) | ||
.catch(() => {}); |
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.
Same thing here
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.
Functionally looks very good to me
<Upload | ||
name="avatar" | ||
accept="image/*" | ||
beforeUpload={(file) => { | ||
getBase64(file, (imageUrl: any) => setAvatar(imageUrl)); | ||
return false; | ||
}} | ||
onRemove={() => setAvatar(null)} | ||
multiple={false} | ||
maxCount={1} | ||
showUploadList={{ | ||
showDownloadIcon: false, | ||
showPreviewIcon: false, | ||
showRemoveIcon: true, | ||
}} | ||
> | ||
<Button icon={<UploadOutlined />}>Selecionar</Button> | ||
</Upload> | ||
<ImgCrop> | ||
<Upload | ||
name="avatar" | ||
accept="image/*" | ||
beforeUpload={(file) => { | ||
getBase64(file, (imageUrl: any) => setAvatar(imageUrl)); | ||
return false; | ||
}} | ||
onRemove={() => setAvatar(null)} | ||
multiple={false} | ||
maxCount={1} | ||
showUploadList={{ | ||
showDownloadIcon: false, | ||
showPreviewIcon: false, | ||
showRemoveIcon: true, | ||
}} |
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.
Aren't these changes duplicated from #181 ? If so it should be removed as it will be automatically updated when that PR gets merged
// const onFinish = (values: any, lectureId: string) => { | ||
// api | ||
|
||
// .updateLecture(lectureId, values) | ||
// .then(() => { | ||
// notifyInfo("Os dados da sessão foram atualizados com sucesso", ""); | ||
// }) | ||
// .catch((error) => { | ||
// notifyError( | ||
// "Ocorreu um erro", | ||
// "Não foi possível atualizar os dados da sessão" | ||
// ); | ||
// }); | ||
// }; |
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.
Remove this if you no longer need it
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.
Nice work 🚀
I created a page that consists of being a list of attendance of the sessions.