forked from harness/canary
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: standardize import paths and improve component styles acros…
…s UI components
- Loading branch information
1 parent
881d78e
commit 636b046
Showing
13 changed files
with
53 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ interface OTPPageProps { | |
isLoading?: boolean | ||
handleFormSubmit?: (data: OtpPageData) => void | ||
error?: string | ||
email?: string | ||
} | ||
|
||
export interface OtpPageData { | ||
|
@@ -42,10 +43,15 @@ const otpPasswordSchema = z.object({ | |
.regex(/^\d+$/, { message: 'Code must contain only numbers' }) | ||
}) | ||
|
||
export function OTPPage({ handleResend, isLoading, handleFormSubmit, error }: OTPPageProps) { | ||
// TODO: remove default email when we have a way to get it from the url or context | ||
export function OTPPage({ | ||
handleResend, | ||
isLoading, | ||
handleFormSubmit, | ||
error, | ||
email = '[email protected]' | ||
}: OTPPageProps) { | ||
const [serverError, setServerError] = useState<string | null>(null) | ||
// TODO: get email from url or from context | ||
const email = '[email protected]' | ||
|
||
const { | ||
handleSubmit, | ||
|
@@ -121,7 +127,6 @@ export function OTPPage({ handleResend, isLoading, handleFormSubmit, error }: OT | |
{(errors.otp || serverError) && ( | ||
<Text | ||
className="text-foreground-danger absolute top-full w-full translate-y-2 leading-none tracking-tight" | ||
weight="light" | ||
align="center" | ||
size={1} | ||
as="p" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters