-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mạnh Tùng Nguyễn
authored and
Mạnh Tùng Nguyễn
committed
Jul 4, 2024
1 parent
2375d25
commit a8cce56
Showing
23 changed files
with
577 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import {useController} from "react-hook-form"; | ||
import {Switch} from "@nextui-org/react"; | ||
|
||
const InputSwitch = (props) => { | ||
const { | ||
field, | ||
fieldState: { invalid, isTouched, isDirty , error}, | ||
formState: { touchedFields, dirtyFields } | ||
} = useController({ | ||
name: props.name, | ||
control: props.control, | ||
rules: props.rules, | ||
}); | ||
|
||
return ( | ||
<Switch | ||
isSelected={field.value} | ||
isDisabled={props.isDisabled} | ||
|
||
onValueChange={field.onChange} | ||
onBlur={field.onBlur} | ||
value={field.value} | ||
ref={field.ref} | ||
|
||
size={'sm'} | ||
> | ||
{props.label} | ||
</Switch> | ||
) | ||
} | ||
|
||
export default InputSwitch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {useDispatch, useSelector} from "react-redux"; | ||
import {formatNumber} from "../../common/common.js"; | ||
import {change} from '../../redux/slice/hideAmount.js' | ||
|
||
const RenderCash = (props) => { | ||
const hideAmount = useSelector((state) => state.hideAmount.value) | ||
const dispatch = useDispatch() | ||
|
||
return <span | ||
onClick={() => dispatch(change())} | ||
className={'font-mono cursor-pointer'} | ||
> | ||
{hideAmount ? '**,***,***' : formatNumber(props.cash)} | ||
</span> | ||
} | ||
|
||
export default RenderCash; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {useEffect} from "react"; | ||
import Dashboard from "./dashboardPage/Dashboard.jsx"; | ||
|
||
const DashboardPage = () => { | ||
useEffect(() => { | ||
document.title = "Dashboard | AdonisGM"; | ||
}, []); | ||
|
||
return <div className={'container mx-auto'}><Dashboard/></div> | ||
} | ||
|
||
export default DashboardPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {useEffect} from "react"; | ||
import Transfer from "./transferPage/Transfer.jsx"; | ||
|
||
const TransferPage = () => { | ||
useEffect(() => { | ||
document.title = "Transfer | AdonisGM"; | ||
}, []); | ||
|
||
return <div className={'container mx-auto'}> | ||
<Transfer/> | ||
</div> | ||
} | ||
|
||
export default TransferPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {useEffect} from "react"; | ||
import Wallet from "./walletPage/Wallet.jsx"; | ||
|
||
const WalletPage = () => { | ||
useEffect(() => { | ||
document.title = "Wallet | AdonisGM"; | ||
}, []); | ||
|
||
return <div className={'container mx-auto'}><Wallet/></div> | ||
} | ||
|
||
export default WalletPage |
Oops, something went wrong.