Skip to content

Implementing an UI to enable users create their own courses#13

Open
Mau-MD wants to merge 65 commits intomainfrom
new_course_ui
Open

Implementing an UI to enable users create their own courses#13
Mau-MD wants to merge 65 commits intomainfrom
new_course_ui

Conversation

@Mau-MD
Copy link
Owner

@Mau-MD Mau-MD commented Jul 19, 2022

App Context

Learning U is a platform where software engineers can go and learn new technologies in an organized way. They can track their progress and get suggestions about what courses to take in both visual and written ways.

PR Context

We do have the backend endpoints to create a new course given a name query, but we don't have an ui nor logic to actually make that possible.

This PR

Adds the necessary logic to make the form work and submit it to the backend. It also adds a Middleware in the backend that fetches a user given a session token in the auth headers

CleanShot 2022-07-19 at 16 17 26

CleanShot.2022-07-19.at.16.19.16.mp4

Next

Create the necessary routes to fetch the resources from the backend and display them in the UI already created.

IMPORTANT:

Since this PR was based in another one, a lot of commits appear here even if they are not related to this PR. In reaility commits start here: Adding formik to new course form

How to preview a PR on Vercel

  • Go to /login and log in with username admin and password admin123
  • Go to /dashboard

@vercel
Copy link

vercel bot commented Jul 19, 2022

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

Name Status Preview Updated
learning-u ✅ Ready (Inspect) Visit Preview Jul 19, 2022 at 11:27PM (UTC)

@Mau-MD Mau-MD added the waiting for another pr Another PR needs to be approved before this gets reviewed label Jul 19, 2022
@Mau-MD Mau-MD requested review from ImaMonsta and nosoyilse July 19, 2022 23:17
@Mau-MD Mau-MD changed the title New course UI Implementing an UI to enable users create their own courses Jul 19, 2022
Copy link
Collaborator

@nosoyilse nosoyilse left a comment

Choose a reason for hiding this comment

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

LGTM!

Very descriptive function names! Readability of the function names is very good!

I will divide the UI and the backend into separate PRs

export const saveResources = async (
resources: IWeightedYoutubeVideo[],
course: Parse.Object<Parse.Attributes>,
level: 1 | 2,
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use an enum here, so that we can now what level 1 and 2 mean:

https://www.typescriptlang.org/docs/handbook/enums.html

Copy link
Owner Author

Choose a reason for hiding this comment

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

I didn't know Enums even existed on Typescript! Thanks for letting me know!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting for another pr Another PR needs to be approved before this gets reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants