-
Notifications
You must be signed in to change notification settings - Fork 5
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
the card component #84
Conversation
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.
This looks great! I added a few comments for things to improve. Let me know if you have any questions
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.
did you also delete the old button.tsx
file?
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.
I don't think so, i think i just renamed the old botton.tsx
@@ -0,0 +1,58 @@ | |||
import React, { useState } from 'react'; | |||
import { PiSpeakerHighFill } from "react-icons/pi"; |
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.
we have fontawesome installed as a dependency - can we use an icon from there?
import React, { useState } from 'react'; | ||
import { PiSpeakerHighFill } from "react-icons/pi"; | ||
|
||
const Card: React.FC<{ |
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.
you can import this in line 1 similar to how you did 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.
same with React.MouseEvent below
TranslatedWord: string; | ||
Pronunciation: string; | ||
DevenagiriSpelling: string; | ||
ImageUrl: string; |
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.
These types look great! A few things to account for - the ImageUrl and PronounciationUrl should be optional because not all words from the API have them available.
@tailwind base; |
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 you make sure that lint runs on this file - the spacing looks a bit off
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.
I don't think the lint catches formatting issues like this, but try to get rid of the extra spaces in this file.
On a related note, there are also lint issues that you need to fix. Error that appear when you run the command pnpm run lint
. You can also see the errors in github actions like so:
Fix any errors that appear for your files, you can ignore the errors that appear related to useNewari
.
here's the card component,