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

fix: fix types and getCDNUrl logic #93

Merged
merged 1 commit into from
Feb 7, 2023
Merged

fix: fix types and getCDNUrl logic #93

merged 1 commit into from
Feb 7, 2023

Conversation

dtjones404
Copy link
Contributor

  • Added missing props to SVGCardLogoProps
  • Slightly reworked logic for getLogoCDNUrl to correctly handle an edge case where users to pass no logoColor prop to logos which have color variants.

@dtjones404 dtjones404 requested a review from a team as a code owner February 7, 2023 18:44
@gregjopa
Copy link
Contributor

gregjopa commented Feb 7, 2023

@dtjones404 I'm seeing the following flow type failures in CI. Can you take a look?

Error -------------------------------------------------------------------------------- src/logos/card/visa/logo.jsx:45:6

Cannot create `SVGCardLogo` element because string [1] is incompatible with boolean [2] in property `loadFromCDN`.
[incompatible-use]

   src/logos/card/visa/logo.jsx:45:6
   45|     <SVGCardLogo
            ^^^^^^^^^^^

References:
   src/logos/card/visa/logo.jsx:40:16
   40| }: { [string]: string } = {}): ComponentNode<SVGCardLogoProps> {
                      ^^^^^^ [1]
   src/lib/components.jsx:79:17
   79|   loadFromCDN?: boolean,
                       ^^^^^^^ [2]

@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

Base: 73.27% // Head: 73.27% // No change to project coverage 👍

Coverage data is based on head (54a3fe5) compared to base (ae38cc6).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #93   +/-   ##
=======================================
  Coverage   73.27%   73.27%           
=======================================
  Files          41       41           
  Lines         348      348           
  Branches       36       36           
=======================================
  Hits          255      255           
  Misses         90       90           
  Partials        3        3           
Impacted Files Coverage Δ
src/lib/components.jsx 50.00% <ø> (ø)
src/logos/card/amex/logo.jsx 85.71% <ø> (ø)
src/logos/card/discover/logo.jsx 85.71% <ø> (ø)
src/logos/card/elo/logo.jsx 85.71% <ø> (ø)
src/logos/card/glyph/logo.jsx 25.00% <ø> (ø)
src/logos/card/hiper/logo.jsx 85.71% <ø> (ø)
src/logos/card/jcb/logo.jsx 85.71% <ø> (ø)
src/logos/card/mastercard/logo.jsx 85.71% <ø> (ø)
src/logos/card/visa/logo.jsx 85.71% <ø> (ø)
src/constants.js 100.00% <100.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dtjones404 dtjones404 merged commit f1dce0f into main Feb 7, 2023
@dtjones404 dtjones404 deleted the hotfix/logo-fixes branch February 7, 2023 19:40
@dtjones404 dtjones404 restored the hotfix/logo-fixes branch February 7, 2023 19:48
@dtjones404 dtjones404 deleted the hotfix/logo-fixes branch February 7, 2023 19:48
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