Преглед изворни кода

Merge branch 'master' of github.com:porter-dev/porter

Justin Rhee пре 3 година
родитељ
комит
0204bd7c8d
2 измењених фајлова са 6 додато и 2 уклоњено
  1. 5 1
      dashboard/src/main/auth/Register.tsx
  2. 1 1
      dashboard/src/shared/Context.tsx

+ 5 - 1
dashboard/src/main/auth/Register.tsx

@@ -95,9 +95,13 @@ const Register: React.FC<Props> = ({
             setUser(res?.data?.id, res?.data?.email);
             authenticate();
           }
+
+          // Temp
+          location.reload();
         })
         .catch((err) => {
-          console.log("registration:", err);
+          console.log("registration:", err)
+          location.reload();
           if (err.response?.data?.error) {
             setCurrentError(err.response.data.error)
           }

+ 1 - 1
dashboard/src/shared/Context.tsx

@@ -132,7 +132,7 @@ class ContextProvider extends Component<PropsType, StateType> {
     user: null,
     setUser: (userId: number, email: string) => {
       this.setState({
-        user: { userId, email, isPorterUser: email.endsWith("@porter.run") },
+        user: { userId, email, isPorterUser: email?.endsWith("@porter.run") },
       });
     },
     devOpsMode: true,