-
-
Notifications
You must be signed in to change notification settings - Fork 639
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
feat: migrate leftover components to typescript #2825
feat: migrate leftover components to typescript #2825
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
components/CaseTOC.tsx
Outdated
closeMenu(); | ||
setOpen(false); | ||
}; | ||
const active = useMemo(() => checkIfActive(item, currSelected), [item, currSelected]); |
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.
Define this above, in next line of open
state.
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.
Done!
components/Testimonial.tsx
Outdated
<svg | ||
className='absolute left-0 top-0 size-8 -translate-y-2 text-primary-500' | ||
fill='currentColor' | ||
viewBox='0 0 32 32' | ||
> | ||
<path d='M9.352 4C4.456 7.456 1 13.12 1 19.36c0 5.088 3.072 8.064 6.624 8.064 3.36 0 5.856-2.688 5.856-5.856 0-3.168-2.208-5.472-5.088-5.472-.576 0-1.344.096-1.536.192.48-3.264 3.552-7.104 6.624-9.024L9.352 4zm16.512 0c-4.8 3.456-8.256 9.12-8.256 15.36 0 5.088 3.072 8.064 6.624 8.064 3.264 0 5.856-2.688 5.856-5.856 0-3.168-2.304-5.472-5.184-5.472-.576 0-1.248.096-1.44.192.48-3.264 3.456-7.104 6.528-9.024L25.864 4z' /> | ||
</svg> |
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.
Make separate icon for this SVG.
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.
Done
useLayoutEffect(() => { | ||
if (!graph) { | ||
return; | ||
} | ||
|
||
try { | ||
const svgElement = document.createElement('div'); | ||
|
||
mermaid.mermaidAPI.render(uuid(), graph, svgElement).then(() => { | ||
setSvg(svgElement.innerHTML); | ||
}); | ||
} catch (e) { | ||
setSvg(null); | ||
// eslint-disable-next-line no-console | ||
console.error(e); | ||
} | ||
}, [graph]); |
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 comment for this hook
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.
Done
/rtm |
Description
This PR migrates the components inside the following folder to TypeScript:
Related issue(s)
#2636