Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

using interface

Blue Mousef14d1173ac29
diff --git a/src/pages/Auth/Signup/BasicSignup.tsx b/src/pages/Auth/Signup/BasicSignup.tsx
index 2f92754b7..aca9637b3 100644
--- a/src/pages/Auth/Signup/BasicSignup.tsx
+++ b/src/pages/Auth/Signup/BasicSignup.tsx
@@ -17,6 +17,15 @@ import { trackCustom } from 'utils/analytics'
import { useAppDispatch } from 'redux/store'
import _omit from 'lodash/omit'
+interface ISignUpForm {
+ email: string,
+ password: string,
+ repeat: string,
+ tos: boolean,
+ dontRemember: boolean,
+ checkIfLeaked: boolean,
+}
+
const BasicSignup = (): JSX.Element => {
const { t }: {
t: (key: string, optinions?: {
@@ -24,14 +33,7 @@ const BasicSignup = (): JSX.Element => {
}) => string,
} = useTranslation('common')
const dispatch = useAppDispatch()
- const [form, setForm] = useState<{
- email: string,
- password: string,
- repeat: string,
- tos: boolean,
- dontRemember: boolean,
- checkIfLeaked: boolean,
- }>({
+ const [form, setForm] = useState<ISignUpForm>({
email: '',
password: '',
repeat: '',
@@ -49,14 +51,7 @@ const BasicSignup = (): JSX.Element => {
const [beenSubmitted, setBeenSubmitted] = useState<boolean>(false)
const [isLoading, setIsLoading] = useState<boolean>(false)
- const onSubmit = (data: {
- email: string,
- password: string,
- repeat: string,
- tos: boolean,
- dontRemember: boolean,
- checkIfLeaked: boolean,
- }) => {
+ const onSubmit = (data: ISignUpForm) => {
if (!isLoading) {
setIsLoading(true)
dispatch(sagaActions.signupAsync(_omit(data, 'tos'), t, (result) => {