pulsar-web/src/views/RegisterView/RegisterView.tsx
2026-01-11 14:17:34 -05:00

28 lines
753 B
TypeScript

import { useNavigate } from "@solidjs/router";
import { createSignal, createEffect, type Component, onMount } from "solid-js";
import { dispatch, state } from "../../store/state";
import { AuthActionTypes } from "../../store/auth";
const RegisterView: Component = () => {
const [getUsername, setUsername] = createSignal("");
const [getEmail, setEmail] = createSignal("");
const [getPassword, setPassword] = createSignal("");
const navigate = useNavigate();
onMount(() => {
dispatch({
type: AuthActionTypes.FETCH_REFRESH_START,
});
});
createEffect(() => {
if (state.auth.loggedIn) {
navigate("/app");
}
});
return <div></div>;
};
export { RegisterView };