Skip to content

Commit

Permalink
Change action in welcome component
Browse files Browse the repository at this point in the history
  • Loading branch information
FPT-NMTung committed May 14, 2024
1 parent 177bf0b commit 3389ec0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/welcomePage/Welcome.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Button, Card, CardBody, Spacer} from "@nextui-org/react";
import {Button, Card, CardBody, CircularProgress, Spacer} from "@nextui-org/react";
import {useEffect, useState} from "react";
import Cookies from "js-cookie";
import {IconArrowBigRightFilled, IconBrandGithubFilled} from "@tabler/icons-react";
Expand Down Expand Up @@ -26,7 +26,7 @@ const quotes = [

const buttonContent = {
login: 'Login with SSO',
register: 'Register',
register: 'Register service',
}

const Welcome = () => {
Expand Down Expand Up @@ -55,7 +55,7 @@ const Welcome = () => {

navigate(`/transaction`);
});
}, [stateButton]);
}, []);

const handleLogin = () => {
const redirect_uri = encodeURIComponent(window.location.origin);
Expand Down Expand Up @@ -101,9 +101,9 @@ const Welcome = () => {
<Spacer y={16}/>
<Button
size="md"
className={'bg-default-900 text-white'}
className={'bg-default-900 text-white w-[160px]'}
onClick={handleClickButton}
isLoading={isRegistering && stateButton === 'register'}
isLoading={isRegistering}
>
{buttonContent[stateButton]}
</Button>
Expand Down

0 comments on commit 3389ec0

Please sign in to comment.