Conversation
There was a problem hiding this comment.
Pull Request Overview
Updates onboarding welcome messaging and related styling cleanup.
- Changes greeting text from "Captain" to "Cap'n".
- Removes unused styled components and a button import in Welcome.tsx.
- Removes default fallback name "Sailor" for waitlist users with no first name.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/web/src/views/Onboarding/steps/welcome/WelcomeScreen.tsx | Adjusts greeting string to new copy. |
| packages/web/src/views/Onboarding/steps/welcome/Welcome.tsx | Cleans up imports and removes unused styled components. |
| packages/web/src/views/Onboarding/steps/waitlist/WaitlistCheck.tsx | Removes fallback name, now sets empty string when firstName is absent. |
| const data = await WaitlistApi.getWaitlistStatus(processedInput); | ||
| setWaitlistStatus(data); | ||
| setFirstName(data.firstName ?? "Sailor"); | ||
| setFirstName(data.firstName ?? ""); |
There was a problem hiding this comment.
Replacing the previous fallback with an empty string means downstream UI (e.g. the welcome message) will render as 'Welcome, Cap'n ' with a trailing space and no name when firstName is missing. Consider retaining a meaningful fallback (e.g. 'Sailor') or conditionally omitting the space/comma when the name is absent.
| setFirstName(data.firstName ?? ""); | |
| setFirstName(data.firstName ?? "Sailor"); |
| prevBtnDisabled={true} | ||
| > | ||
| <OnboardingText>Welcome, Captain {firstName}</OnboardingText> | ||
| <OnboardingText>Welcome, Cap'n {firstName}</OnboardingText> |
There was a problem hiding this comment.
[nitpick] Using ' here is unnecessary in JSX text and slightly reduces readability; you can safely use a plain apostrophe: Welcome, Cap'n {firstName}. This avoids HTML entity decoding and keeps the string consistent with typical JSX text content.
| <OnboardingText>Welcome, Cap'n {firstName}</OnboardingText> | |
| <OnboardingText>Welcome, Cap'n {firstName}</OnboardingText> |
| const data = await WaitlistApi.getWaitlistStatus(processedInput); | ||
| setWaitlistStatus(data); | ||
| setFirstName(data.firstName ?? "Sailor"); | ||
| setFirstName(data.firstName ?? ""); |
There was a problem hiding this comment.
Setting firstName to an empty string when data.firstName is null/undefined will result in 'Welcome, Cap'n ' (with trailing space) being displayed. Consider using a default name or handle the empty case in the welcome message.
| setFirstName(data.firstName ?? ""); | |
| setFirstName(data.firstName ?? "matey"); |
|
This work is invalided by the recent waitlist changes in #1071 |
No description provided.