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

Added charMap property in Digit. Added Story for additional character… #3

Merged
merged 7 commits into from
Dec 3, 2024

Conversation

through-space
Copy link

… in charMap. Exported default character to variable. Added Story for illegal character. Added .gitignore

lvil added 5 commits November 20, 2024 11:58
@nachovigilante
Copy link
Owner

I'm loaded on work right now, but I'll review this PR soon!

Copy link
Owner

@nachovigilante nachovigilante left a comment

Choose a reason for hiding this comment

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

I agree with the changes proposed, I think it's a good idea. Thanks for taking the time, let me know what you think about the changes I requested.

@@ -1,6 +1,7 @@
import { Meta, StoryObj } from "@storybook/react";

import { Digit } from "../components/Digit";
import CharToDigit from "../utils/charToDigit";
Copy link
Owner

Choose a reason for hiding this comment

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

Here, the import should be chatToDigit

Copy link
Author

Choose a reason for hiding this comment

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

I don't quite get it? Do I have a typo? Do you😅?

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, it's a typo. Since utils/charToDigit.ts exports charToDigit by default, you can rename it when you import it, that's why this code works anyways. But it should be charToDigit since it is the array that you want and not the type. Don't worry, I'll merge the PR and then fix it.

Copy link
Owner

Choose a reason for hiding this comment

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

I like the idea of giving this type a name, but I would like it to be a type and not an interface (for consistency). On top of that, let's change the name to CharMap (without an I at the start). Also, if you think it's a good idea, change charToDigit to defaultCharMap.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed all these

Copy link
Owner

@nachovigilante nachovigilante left a comment

Choose a reason for hiding this comment

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

Great, thank you for your contributions!

@nachovigilante nachovigilante merged commit 2a6e86e into nachovigilante:main Dec 3, 2024
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.

2 participants