Compare commits

..

No commits in common. "main" and "v0.0.2" have entirely different histories.
main ... v0.0.2

View File

@ -7,7 +7,7 @@ import { fetchToken } from "./login";
const signUp = async (username: string, password: string, token: string) => {
try {
const response = await api.post(`/auth/signup?token=${token}`, {
const response = await api.post(`/signup?token=${token}`, {
username: username,
password: password,
}, {
@ -23,7 +23,7 @@ export function SignupPage(props: {}) {
const [apiAuthenticated, setApiAuthenticated] = useContext(apiAuthenticatedContext)
const [searchParam, setSearchParam] = useSearchParams();
const token = searchParam.get('token');
if (token === null) {
if (token === null){
return <Navigate to='/' />
}
@ -36,7 +36,7 @@ export function SignupPage(props: {}) {
const data = new FormData(event.currentTarget);
const usernameFormData: FormDataEntryValue | null = data.get('username');
const passwordFormData: FormDataEntryValue | null = data.get('password');
if (usernameFormData === null || passwordFormData === null) {
if (usernameFormData === null || passwordFormData === null){
return
}
const username: string = usernameFormData.toString();