Skip to content

Commit

Permalink
fix: button color (TeamVastsea#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaoNeng-wWw authored Nov 26, 2023
1 parent 50e1c5e commit 1de5185
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions app/authenticate/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export default function Page() {
setLoading(false);
return;
}
UserAPI.checkEmail(email)
UserAPI.checkEmail(userInput)
.then(r => {
setPageType(r ? "login" : "register")
if (!r) {
Expand Down Expand Up @@ -347,9 +347,11 @@ export default function Page() {
<Button
isLoading={loading}
disabled={
disabled
pageType !== 'wait-check' ? disabled : !policyState && isEmail || isPhone
}
color={
pageType !== 'wait-check' ? buttonColor : policyState && isEmail || isPhone ? 'primary' : 'default'
}
color={buttonColor}
onClick={handleClick()[pageType]}
>
{buttonMessage}
Expand Down
2 changes: 1 addition & 1 deletion providers/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import axios, { AxiosError } from "axios";
import cookie from 'react-cookies';

export const http = axios.create({
baseURL: process.env.NODE_ENV === 'development' ? '/api' : process.env.NEXT_PUBLIC_API_SERVER,
baseURL: process.env.NEXT_PUBLIC_API_SERVER,
timeout: 6000,
withCredentials: true,
});
Expand Down

0 comments on commit 1de5185

Please sign in to comment.