Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

Commit

Permalink
small bug fixes in frontend (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
GammaMicrowave committed Jun 6, 2023
1 parent f66e139 commit 16d8744
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 52 deletions.
2 changes: 1 addition & 1 deletion components/elements/Appbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function index() {
okText="Yes"
cancelText="No"
>
<Link onClick={() => router.push('/')}>logout</Link>
logout
</Popconfirm>
),
icon: <BiLogOut />,
Expand Down
4 changes: 2 additions & 2 deletions components/elements/GoogleOAuth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { FcGoogle } from 'react-icons/fc';
import { get } from '../../utils/API';

export default function GoogleOAuth() {
export default function GoogleOAuth({ text }) {
const click = async () => {
const response = await get('/auth/google');
window.open(response.data.data.url, '_self');
Expand All @@ -18,7 +18,7 @@ export default function GoogleOAuth() {
<FcGoogle />
</div>
<div className="w-full text-left opacity-80 font-inter font-semibold">
Sign in with Google
{text}
</div>
</div>
);
Expand Down
3 changes: 2 additions & 1 deletion components/utils/API/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { getLS, removeLS } from '../LocalStorage/index';
const API_URL =
process.env.NEXT_PUBLIC_ENVIORNMENT === 'prod'
? 'https://api.savemyform.tk'
: 'https://dev-api.savemyform.tk';
: 'http://localhost:8080';
// : 'https://dev-api.savemyform.tk';

const getAccessToken = () => {
return getLS('secret');
Expand Down
126 changes: 80 additions & 46 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function MyApp({ Component, pageProps }) {
<Hydrate state={pageProps.dehydratedState}>
<GoogleReCaptchaProvider
reCaptchaKey={'6LcZo3cjAAAAAPEshUhFpjSOLdDaTQEbSoEwwB67'}
// reCaptchaKey='1081830613309-46fos7bns3vhlh8qpbvdidm5qvapioob.apps.googleusercontent.com'
scriptProps={{
async: false,
defer: true,
Expand Down
2 changes: 1 addition & 1 deletion pages/signin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function SignIn() {
>
Submit
</button>
<GoogleOAuth />
<GoogleOAuth text="Sign In with Google" />
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion pages/signup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default function SignUp() {
>
Submit
</button>
<GoogleOAuth />
<GoogleOAuth text="Sign Up with Google" />
</form>
</div>
</div>
Expand Down

1 comment on commit 16d8744

@vercel
Copy link

@vercel vercel bot commented on 16d8744 Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.