Skip to content

Commit de506a3

Browse files
committed
Fix registration subscription
1 parent 35d281d commit de506a3

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

@app/client/src/pages/login.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ function LoginForm({
128128
error,
129129
setError,
130130
}: LoginFormProps) {
131-
const [login] = useLoginMutation({
132-
refetchQueries: ["SharedLayout"],
133-
});
131+
const [login] = useLoginMutation({});
134132
const client = useApolloClient();
135133
const validateFields: (
136134
fieldNames?: Array<string>,
@@ -153,8 +151,8 @@ function LoginForm({
153151
},
154152
});
155153
// Success: refetch
156-
client.resetStore();
157154
resetWebsocketConnection();
155+
client.resetStore();
158156
Router.push(onSuccessRedirectTo);
159157
} catch (e) {
160158
const code = getCodeFromError(e);

@app/client/src/pages/register.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ function RegistrationForm({
7777
error,
7878
setError,
7979
}: RegistrationFormProps) {
80-
const [register] = useRegisterMutation({
81-
refetchQueries: ["SharedLayout"],
82-
});
80+
const [register] = useRegisterMutation({});
8381
const client = useApolloClient();
8482
const [confirmDirty, setConfirmDirty] = useState(false);
8583

@@ -110,8 +108,8 @@ function RegistrationForm({
110108
},
111109
});
112110
// Success: refetch
113-
client.resetStore();
114111
resetWebsocketConnection();
112+
client.resetStore();
115113
Router.push(onSuccessRedirectTo);
116114
} catch (e) {
117115
const code = getCodeFromError(e);

0 commit comments

Comments
 (0)