-
Notifications
You must be signed in to change notification settings - Fork 2
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
Disable About page prefetching #1938
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ import { | |
SEARCH_NEW, | ||
SEARCH_POPULAR, | ||
SEARCH_UPCOMING, | ||
ABOUT_NON_DEGREE_LEARNING_FRAGMENT, | ||
} from "@/common/urls" | ||
import { | ||
RiAwardLine, | ||
|
@@ -26,7 +27,6 @@ import { | |
RiTimeLine, | ||
RiVerifiedBadgeLine, | ||
} from "@remixicon/react" | ||
import { NON_DEGREE_LEARNING_FRAGMENT_IDENTIFIER } from "@/app-pages/AboutPage/AboutPage" | ||
import Image from "next/image" | ||
import { SearchField } from "@/page-components/SearchField/SearchField" | ||
|
||
|
@@ -221,7 +221,9 @@ const HeroSearch: React.FC<{ imageIndex: number }> = ({ imageIndex }) => { | |
<Typography> | ||
Explore MIT's{" "} | ||
<BoldLink | ||
href={`${ABOUT}#${NON_DEGREE_LEARNING_FRAGMENT_IDENTIFIER}`} | ||
href={`${ABOUT}#${ABOUT_NON_DEGREE_LEARNING_FRAGMENT}`} | ||
prefetch={false} | ||
scroll={false} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In what sense was it not working correctly? Currently works as I expect on https://rc.learn.mit.edu/. For me, scrolls to here: It doesn't scroll exactly to the header, but I think that's normal. Request: Leave scroll behavior as-was. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looked off to me because the page isn't long enough for the hash fragment to load scrolled to top. I agree though that that doesn't actually constitute not working correctly. I've changed it back. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahhh, I didn't think about it enough to explain why it doesn't go all the way to the top. That makes sense, though. |
||
> | ||
Non-Degree Learning | ||
</BoldLink> | ||
|
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.
btw: This import goes against our hierearchy rules, and should have been forbidden.
Our lint rule enforcing this seems to be broken for two reasons:
"*/tsconfig.json"
should be `"**/tsconfig.json"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 shout - I've updated the rules. This required moving the carousels config into
common
. This does import a type from@/page-components/ResourceCarousel/ResourceCarousel
. Perhaps we should disallow or allow only for types.