Skip to content

fix: correct invalid JSX style props and CSS comment breaking build - #979

Open
baling-1 wants to merge 1 commit into
Creditra:mainfrom
baling-1:fix/compare-lines-panel-jsx-build
Open

fix: correct invalid JSX style props and CSS comment breaking build#979
baling-1 wants to merge 1 commit into
Creditra:mainfrom
baling-1:fix/compare-lines-panel-jsx-build

Conversation

@baling-1

@baling-1 baling-1 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #943

Fixes the frontend production build, which was failing to parse src/components/CompareLinesPanel.tsx.

Changes

src/components/CompareLinesPanel.tsx

The component used single-brace JSX style props, which the JSX/Babel parser rejects with Expected "}" but found ":":

<div style={ fontSize: '0.75rem', color: 'var(--muted)', marginBottom: '0.25rem' }>

JSX style props must be an object literal, i.e. double braces:

<div style={{ fontSize: '0.75rem', color: 'var(--muted)', marginBottom: '0.25rem' }}>
  • Converted all 8 occurrences of the single-brace form to style={{ ... }}:
    • the 4 label/value rows inside renderValue (the two files' 4 grid cells),
    • the outer #compare-panel wrapper,
    • the header row, the "Compare Credit Lines" <h2>, the close <button>, and the scroll <div>.
  • Also fixed a separate syntax error in the same wrapper: the height value contained a literal newline inside the string literal ('100vh\n'), which is not a valid string literal; now '100vh'.

src/index.css

Replaced a // line comment that followed a CSS @import:

@import "./styles/themes/high-contrast.css"; // High‑contrast overrides

// is not valid CSS comment syntax — the rest of the line is parsed as a selector, producing an invalid empty selector warning. Now a proper block comment:

/* High-contrast overrides */
@import "./styles/themes/high-contrast.css";

Only files with the actual breakage were touched; no unrelated refactors or behaviour changes.

Verification

  • Grepped src for any other single-brace style={ ... occurrences and any other // line comments in .css files: none remain (Skeleton.css has // only inside a /** */ block comment, which is valid).
  • A full npm run build could not be executed in this environment: node_modules is not present, the npm registry is unreachable (network timeouts), and both the local npm and pnpm offline caches are missing entries (react-router-dom / @adobe/css-tools). The parse-level cause of the reported failure is eliminated by these edits.
  • CI (tsc -b && vite build) should be re-run on this branch to confirm the clean build.

CompareLinesPanel.tsx used single-brace style props in JSX, which the
parser rejects ("Expected '}' but found ':'"), and one style object
contained a literal newline inside the 'height' string literal. Convert
every style prop to the double-brace object form style={{ ... }}.

index.css used a // line comment after a CSS @import, which CSS treats
as an invalid empty selector; replace it with a /* ... */ comment.
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

Hey @baling-1! 👋 It looks like this PR isn't linked to any issue.

If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g., Closes #123), or by clicking a button below:

Issue Title
#932 [Quality-2][High] Prevent duplicate draw submissions from double-clicks Link to this issue

ℹ️ Learn more about linking PRs to issues

@greatest0fallt1me

Copy link
Copy Markdown
Contributor

I found no GitHub-recognized issue link in this PR. Please add a valid closing reference such as Closes #<issue-number> for the issue this change addresses, then I can review it for merging.

@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Please link this pull request to the issue it addresses by adding a closing reference such as in the PR description. Once linked, we can verify it against the intended issue.

@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Please link this pull request to the issue it addresses by adding a closing reference such as Closes # in the PR description. Once linked, we can verify it against the intended issue.

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.

[Quality-2][Medium] Add accessible focus management to repayment dialogs

2 participants