Skip to content

Conversation

@ChristopherChudzicki
Copy link
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/5543

Description (What does it do?)

This PR adds most of the query config from main branch to the NextJS app.

How can this be tested?

  1. Load the homepage with network tab open. API requests should be made once, not over and over.
  2. When authenticated, featured courses on homepage should have correct filled-in / unfilled bookmark icons.

@ChristopherChudzicki ChristopherChudzicki changed the base branch from main to nextjs September 20, 2024 19:58
/*
* Prefetch the first tab (All) of the carousel
*/
await queryClient.prefetchQuery(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Getting rid of this because with a nonzero staletime, the featured course bookmarks are problematic: the resources are user-dependent, so they can't really be fetched on the server, unless they are immediately refetched, which we don't want.

We can re-enable this once https://github.com/mitodl/hq/issues/5159 is done

@ChristopherChudzicki ChristopherChudzicki added the Needs Review An open Pull Request that is ready for review label Sep 20, 2024
@ChristopherChudzicki ChristopherChudzicki force-pushed the cc/nextjs-configure-queryclient branch from 77eae6a to df93778 Compare September 20, 2024 20:06
@ChristopherChudzicki ChristopherChudzicki changed the title Cc/nextjs configure queryclient [NextJS] configure query client like on main Sep 20, 2024
@ChristopherChudzicki ChristopherChudzicki marked this pull request as ready for review September 20, 2024 20:26
@jonkafton jonkafton merged commit cbc80b0 into nextjs Sep 23, 2024
@jonkafton jonkafton self-requested a review September 23, 2024 18:55
Copy link
Contributor

@jonkafton jonkafton left a comment

Choose a reason for hiding this comment

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

@jonkafton jonkafton deleted the cc/nextjs-configure-queryclient branch September 23, 2024 18:56
@jonkafton jonkafton removed the Needs Review An open Pull Request that is ready for review label Sep 23, 2024
jonkafton pushed a commit that referenced this pull request Sep 23, 2024
* use react-query directly

* better query caching

* remove featured-courses prefetches
jonkafton pushed a commit that referenced this pull request Sep 23, 2024
* use react-query directly

* better query caching

* remove featured-courses prefetches
jonkafton pushed a commit that referenced this pull request Sep 24, 2024
* use react-query directly

* better query caching

* remove featured-courses prefetches
@odlbot odlbot mentioned this pull request Oct 22, 2024
74 tasks
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