From 52d5c0eee4c986b8c9bd0affb9d8f6ca716386b6 Mon Sep 17 00:00:00 2001 From: danis Date: Sat, 28 Jan 2023 20:39:54 +0300 Subject: [PATCH] PR fix front issues --- front/views/AuthenticationView.tsx | 7 +------ front/views/__snapshots__/AuthenticationView.test.tsx.snap | 3 --- front/views/__snapshots__/HomeView.test.tsx.snap | 3 --- front/views/__snapshots__/SettingsView.test.tsx.snap | 5 ----- 4 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 front/views/__snapshots__/AuthenticationView.test.tsx.snap delete mode 100644 front/views/__snapshots__/HomeView.test.tsx.snap delete mode 100644 front/views/__snapshots__/SettingsView.test.tsx.snap diff --git a/front/views/AuthenticationView.tsx b/front/views/AuthenticationView.tsx index 332cbf5..efe038c 100644 --- a/front/views/AuthenticationView.tsx +++ b/front/views/AuthenticationView.tsx @@ -6,9 +6,6 @@ import { setAccessToken } from "../state/UserSlice"; import { Center, Button, Text } from 'native-base'; import SigninForm from "../components/forms/signinform"; import SignupForm from "../components/forms/signupform"; -import { Provider } from "react-redux"; -import store from '../state/Store'; - const hanldeSignin = async (username: string, password: string, apiSetter: (accessToken: string) => void): Promise => { try { @@ -35,12 +32,11 @@ const AuthenticationView = () => { const [mode, setMode] = React.useState("signin" as "signin" | "signup"); return ( -
{mode === "signin" ? hanldeSignin(username, password, (accessToken) => dispatch(setAccessToken(accessToken)))} /> - : handleSignup(username, password, email, (accessToken) => dispatch(setAccessToken(accessToken)))} /> + : handleSignup(username, password, email, (accessToken) => dispatch(setAccessToken(accessToken)))} /> } { mode ==="signin" && }
-
); }; diff --git a/front/views/__snapshots__/AuthenticationView.test.tsx.snap b/front/views/__snapshots__/AuthenticationView.test.tsx.snap deleted file mode 100644 index 67de779..0000000 --- a/front/views/__snapshots__/AuthenticationView.test.tsx.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`AuthenticationView Component view should render 1`] = `[Function]`; diff --git a/front/views/__snapshots__/HomeView.test.tsx.snap b/front/views/__snapshots__/HomeView.test.tsx.snap deleted file mode 100644 index 5d66f46..0000000 --- a/front/views/__snapshots__/HomeView.test.tsx.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` Main View should render correctly 1`] = `[Function]`; diff --git a/front/views/__snapshots__/SettingsView.test.tsx.snap b/front/views/__snapshots__/SettingsView.test.tsx.snap deleted file mode 100644 index 471f62a..0000000 --- a/front/views/__snapshots__/SettingsView.test.tsx.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`testing Setting's main view Main View should render correctly 1`] = `[Function]`; - -exports[`testing Setting's main view Preference View should render correctly 1`] = `[Function]`;