mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
This commit adds the necessary functionality to confirm a user's account. It includes the addition of a new column in the user table to track whether an account is confirmed or not, and the implementation of JWT for confirmation tokens. This commit integrates the SparkPost API as well as React Email to send dynamic emails for whatever purpose. Upon user registration, a confirmation email will be sent to the user.
24 lines
487 B
TypeScript
24 lines
487 B
TypeScript
import { FunctionComponent } from 'react';
|
|
|
|
interface FormButtonProps {
|
|
children: string;
|
|
type: 'button' | 'submit' | 'reset';
|
|
isSubmitting?: boolean;
|
|
}
|
|
|
|
const Button: FunctionComponent<FormButtonProps> = ({
|
|
children,
|
|
type,
|
|
isSubmitting = false,
|
|
}) => (
|
|
// eslint-disable-next-line react/button-has-type
|
|
<button
|
|
type={type}
|
|
className={`btn btn-primary w-full rounded-xl ${isSubmitting ? 'loading' : ''}`}
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
|
|
export default Button;
|