-
Notifications
You must be signed in to change notification settings - Fork 0
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
style blogpost page #44
Conversation
…rs/style-blogpost-page
…rs/style-blogpost-page
- encapsulated chapter getter as an util function, - pushed chapter listing to page.tsx,
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 💯
}) | ||
} | ||
|
||
const [url, setUrl] = useState('') |
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.
Can't we use window.location.href
directly, instead of setting url in a useEffect?
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.
nvm, it's because of nextjs shenanigans, of course
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.
yep, classic nextjs shenanigans 😅
for future refference: for this type of projects would astro (or similar) be leaner / less bloated code-wise than nextjs?
Why:
How:
dangerouslySetInnerHTML
and ensure all headings are enforced to h5 to maintain format consistency as well as labeling chapters;