Repository navigation
brand review layout update #130
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,6 +11,11 @@ const platforms = [ | |||||
| { name: "TikTok", icon: "/tiktok.png" }, | ||||||
| ]; | ||||||
|
|
||||||
| type Readonlyfield = { | ||||||
|
||||||
| type Readonlyfield = { | |
| type ReadOnlyFieldProps = { |
Copilot
AI
Apr 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReadOnlyField is typed as React.FC<...> but this file doesn't import React, so TypeScript will error with Cannot find name 'React' (new JSX transform doesn't provide the React namespace). Import the FC type from react (or import React) and update the annotation accordingly.
Copilot
AI
Apr 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<label> is being used to title a non-form-control element (the value is rendered in a <div>). This is semantically incorrect and can confuse screen readers. Use a non-label element (e.g., <div>/<span>) for the text, or render an actual form control with a matching htmlFor/id pairing.
Copilot
AI
Apr 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL.createObjectURL(brandData.logo) is called during render, which can create a new object URL on every re-render and leak memory if not revoked. Prefer deriving the preview URL once when brandData.logo changes (and revoke it in cleanup), or rely solely on brandLogoPreview for the image src.
| src={brandLogoPreview || (brandData.logo ? URL.createObjectURL(brandData.logo) : undefined)} | |
| src={brandLogoPreview || undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix logo preview crash when onboarding resumes
Restoring brandData from localStorage gives you a plain object for logo (Files aren’t JSON‑serializable). After this change the review step now does URL.createObjectURL(brandData.logo) and later brandData.logo.name.split(...), so if the user reloads mid-onboarding the first render throws a TypeError and handleBrandSubmit will also explode when it hits .name. Please guard every File-specific operation with instanceof File, and don’t persist the raw File in brandData (omit it or store a serializable preview URL before calling localStorage.setItem). Without those changes brand onboarding becomes unrecoverable after a page refresh.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change introduces whitespace-only lines in the HTML (e.g., inside
<body>and before</html>), which tends to create noisy diffs and can violate format/lint rules if enforced. Consider removing the extra blank/space-only lines.