chore(style): codebase em-dash sweep + minor layout polish
Replaces every em-dash and en-dash with regular ASCII hyphens across comments, JSX strings, and dev-facing logs. Mostly cosmetic but stops the inconsistent mix that crept in over the last few months (some files used em-dashes in comments, others didn't, some used both). Bundles two small dashboard-layout tweaks that touch a couple of already-modified files: - (dashboard)/layout.tsx main padding goes from p-6 to pt-3 px-6 pb-6 so page content sits closer to the topbar. - Sidebar now receives the ports list it needs for the footer port switcher. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ import { detectDefaultCountry, type CountryCode } from '@/lib/i18n/countries';
|
||||
export interface PhoneInputValue {
|
||||
/** E.164 form ('+442079460958'). Null when empty or unparseable. */
|
||||
e164: string | null;
|
||||
/** Country selected in the dropdown — drives the AsYouType formatter. */
|
||||
/** Country selected in the dropdown - drives the AsYouType formatter. */
|
||||
country: CountryCode;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ interface PhoneInputProps {
|
||||
* Phone input with a country flag dropdown + format-as-you-type.
|
||||
*
|
||||
* Wire shape: emits `{ e164, country }` on every change. E.164 is null
|
||||
* while the input is too short to parse — that's a form-validation
|
||||
* while the input is too short to parse - that's a form-validation
|
||||
* concern, not an input concern. Pasting an international number
|
||||
* (`+1 415…`) auto-switches the country dropdown to match.
|
||||
*
|
||||
@@ -62,7 +62,7 @@ export function PhoneInput({
|
||||
const parsed = parsePhone(value.e164, value.country);
|
||||
return parsed.national ?? '';
|
||||
});
|
||||
// Track whether the user has typed since mount — keeps a controlled-from-props
|
||||
// Track whether the user has typed since mount - keeps a controlled-from-props
|
||||
// value sync on first render only.
|
||||
const initialized = useRef(false);
|
||||
|
||||
@@ -78,7 +78,7 @@ export function PhoneInput({
|
||||
|
||||
function handleInput(raw: string) {
|
||||
// Paste-detect: if user pasted an international format, parse it
|
||||
// and flip the country dropdown to match — better UX than asking
|
||||
// and flip the country dropdown to match - better UX than asking
|
||||
// them to also click the dropdown.
|
||||
if (raw.startsWith('+')) {
|
||||
const parsed = parsePhone(raw);
|
||||
|
||||
Reference in New Issue
Block a user