-
-
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 tools components to typescript #2774
feat: migrate tools components to typescript #2774
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/tools/Tags.tsx
Outdated
}; | ||
|
||
/** | ||
* @description This component displays tags. |
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.
Describe these tags more, on where it is used.
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/tools/ToolsCard.tsx
Outdated
useEffect(() => { | ||
const divHeight = descriptionRef.current?.offsetHeight || 0; | ||
const numberOfLines = divHeight / 20; | ||
|
||
if (numberOfLines > 3) { | ||
setShowMoreDescription(true); | ||
} else { | ||
setShowMoreDescription(false); | ||
}; | ||
}, []); |
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 a comment here.
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/tools/ToolsList.tsx
Outdated
</Paragraph> | ||
<hr className='my-8' /> | ||
<div className='flex grid-cols-3 flex-col gap-8 lg:grid'> | ||
{toolsListData[categoryName].toolsList.map((tool, toolIndex) => ( | ||
<ToolsCard key={toolIndex} toolData={tool} /> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
|
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.
</Paragraph> | |
<hr className='my-8' /> | |
<div className='flex grid-cols-3 flex-col gap-8 lg:grid'> | |
{toolsListData[categoryName].toolsList.map((tool, toolIndex) => ( | |
<ToolsCard key={toolIndex} toolData={tool} /> | |
))} | |
</div> | |
</div> | |
); | |
</Paragraph> | |
<hr className='my-8' /> | |
<div className='flex grid-cols-3 flex-col gap-8 lg:grid'> | |
{toolsListData[categoryName].toolsList.map((tool, toolIndex) => ( | |
<ToolsCard key={toolIndex} toolData={tool} /> | |
))} | |
</div> | |
</div> | |
); |
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.
Hi, I can't understand, what to change here. The indentation is already correct. Can you please elaborate a little on this?
scripts/tools/categorylist.ts
Outdated
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.
Don't migrate this file to typescript. These files are part of scripts and we aren't migrating scripts folder yet.
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
scripts/tools/categorylist.js
Outdated
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.
Is it necessary to make these changes?
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.
Nope, I have restored the original content.
/rtm |
Description
This PR migrates the components inside the following folder to TypeScript:
Related issue(s)
#2636