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

the card component #84

Closed
wants to merge 1 commit into from
Closed

the card component #84

wants to merge 1 commit into from

Conversation

sirElvin
Copy link
Contributor

@sirElvin sirElvin commented Jul 8, 2024

here's the card component,

Copy link
Member

@christikaes christikaes left a 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

Copy link
Member

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?

Copy link
Contributor Author

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";
Copy link
Member

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<{
Copy link
Member

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

Copy link
Member

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;
Copy link
Member

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;
Copy link
Member

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

Copy link
Member

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:

CleanShot 2024-07-08 at 22 05 27

Fix any errors that appear for your files, you can ignore the errors that appear related to useNewari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants