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

Refactor to typescript attempt #50

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft

Conversation

kweeuhree
Copy link
Collaborator

@kweeuhree kweeuhree commented Sep 17, 2024

Description

This code proposes refactoring our application to TypeScript. These changes will keep the app type safe, scalable and easy to read and to debug.
Some console logs are still in place as the work is still in progress.

Type of Changes

enhancement

Updates

Added types.

Issues

  • Duplicate items are still being added;
  • New items are being added on refresh - this affects normalization and duplicate check

Testing Steps / QA Criteria

  • Ran npm start and navigated to localhost:3000,
  • Logged in,
  • Added a new list,
  • Added unique and duplicate items to a new list,
  • Shared new list,
  • Verified that list will be only shared when the list is owned by the user that is currently logged in.

- install types and necessary dependencies;
- add TypeScript configuration;
- change extention of files to .tsx;
- add User and Item types.
@kweeuhree kweeuhree self-assigned this Sep 17, 2024
@kweeuhree kweeuhree added help wanted Extra attention is needed refactoring labels Sep 17, 2024
Comment on lines +28 to +29
userId: string | null | undefined,
userEmail: string | null | undefined,
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I wonder if this might simplify a little bit

Suggested change
userId: string | null | undefined,
userEmail: string | null | undefined,
userId?: string | null,
userEmail?: string | null,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants