Skip to content
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

Merged
merged 11 commits into from
Apr 7, 2024
Merged

feat: migrate leftover components to typescript #2825

merged 11 commits into from
Apr 7, 2024

Conversation

devilkiller-ag
Copy link
Member

@devilkiller-ag devilkiller-ag commented Mar 30, 2024

Description
This PR migrates the components inside the following folder to TypeScript:

  • NewsletterSubscribe
  • CaseTOC
  • GeneratorInstallation
  • Features
  • Hero
  • InlineHelp
  • MDX
  • Testimonial

Related issue(s)
#2636

Copy link

netlify bot commented Mar 30, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1ef0b9d
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/66122edf6bed7800088b806d
😎 Deploy Preview https://deploy-preview-2825--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@devilkiller-ag devilkiller-ag changed the title Migrate leftover components to typescript feat: migrate leftover components to typescript Mar 30, 2024
components/CaseTOC.tsx Show resolved Hide resolved
closeMenu();
setOpen(false);
};
const active = useMemo(() => checkIfActive(item, currSelected), [item, currSelected]);
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

Comment on lines 32 to 38
<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>
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Comment on lines +87 to +103
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]);
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@akshatnema
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit d01560f into asyncapi:migrate-ts Apr 7, 2024
14 checks passed
@devilkiller-ag devilkiller-ag deleted the ag-ts-components branch April 7, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants