-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add staging deployment to ci * Fix transaction UI issues. * Updated Difficulty, Hashrate, PslPrice, TransactionFee * Fixed yarn build issues. * fix-ci: build it in circle ci * fix-ci: cleanup * fix typo * use new context for staging build * fix typo * fix context issue on staging build * do it right man :) * update front end with fixing UI * add hassh rate and transaction fee * fix prettier issue * filter, theme update * Fix style issue * fix style issues * fix style issue of theme * fix mempool size chart * fix theme style issues * sort table * missing collapsesection * Fix and update CollapseSection * Update filter part * update filter part * Fixed Scrollbar style * filter table - add filter movement and transactions tables * filter - close after select time * Change color twitter, telegram, github icon to white * no message * Add border for boxed on explorer * Update Color of Sidebar * change color of button * Fixed UI issues * movement - fix add depend change date * Fixed icon color and background * Fixed table issue, block issue, new chart * Fixed style issues * adding space on boxes * Change "NonStandard TX" to "Shielded Transaction" * update * transaction - fix block confirmed number * volume of transactions - update list volume of transactions * historical statistics - fix the transaction fee chart * transaction count - add the transaction count chart and update the transaction fee * historical statistics - add the total transaction count chart * Fix responsive issue * add missing images. * charts - responsive mobile and refactor, clean code * charts - fix responsive axis * Fix issue from PR * fix mobile response, add the go back button and create layout, get realtime sumary stats, fix get data with socket listen, fix offset value, set default period chart, fix search, sidebar and chart * explorer - add transactions live * explorer - hide lastest block section * lastest block - feat add leatest blocks realtime and setup redux thunk for blocks * cherry-pick CI commit from master, resolve ci failure * transaction - change name file and variables, transactions - add trasaction realtime and fix ui * add transactions link * updated path. * Fixed CircleCI/CD * fix(view): chart ui - fix responsive chart ui * fix(setup): lint - end of line * fix(view): block chart - fix title * fix(view): historical statistics - remove back icon * fix(setup): redux thunk - update type for selector Co-authored-by: crazyoptimist <[email protected]>
- Loading branch information
1 parent
f0274cd
commit a3128c0
Showing
41 changed files
with
805 additions
and
240 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -22,3 +22,4 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
/.vscode |
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 { axiosInstance } from '@utils/helpers/useFetch/useFetch'; | ||
import { BLOCK_URL } from '@utils/constants/urls'; | ||
import { IBlock } from '@utils/types/IBlocks'; | ||
|
||
const getLatestBlock = async (limit = 8) => { | ||
const { | ||
data: { data, timestamp }, | ||
}: { data: { data: IBlock[]; timestamp: number } } = await axiosInstance.get(BLOCK_URL, { | ||
params: { limit }, | ||
}); | ||
|
||
const blockTuple: [string, IBlock][] = data.map((block: IBlock) => [block.id, block]); | ||
const mapDate = new Map(blockTuple); | ||
return { data: mapDate, timestamp }; | ||
}; | ||
|
||
export default { getLatestBlock }; |
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,20 @@ | ||
import { axiosInstance } from '@utils/helpers/useFetch/useFetch'; | ||
import { TRANSACTION_URL } from '@utils/constants/urls'; | ||
import { ITransaction } from '@utils/types/ITransactions'; | ||
|
||
const getLatestTransactions = async (limit = 8) => { | ||
const { | ||
data: { data, timestamp }, | ||
}: { data: { data: ITransaction[]; timestamp: number } } = await axiosInstance.get( | ||
TRANSACTION_URL, | ||
{ | ||
params: { offset: 0, limit, sortBy: 'timestamp', sortDirection: 'DESC' }, | ||
}, | ||
); | ||
|
||
const blockTuple: [string, ITransaction][] = data.map((block: ITransaction) => [block.id, block]); | ||
const mapDate = new Map(blockTuple); | ||
return { data: mapDate, timestamp }; | ||
}; | ||
|
||
export default { getLatestTransactions }; |
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 |
---|---|---|
@@ -1,34 +1,47 @@ | ||
import { useCallback, ChangeEvent } from 'react'; | ||
import Switch from '@material-ui/core/Switch'; | ||
import FormControlLabel from '@material-ui/core/FormControlLabel'; | ||
import { useCallback, MouseEvent } from 'react'; | ||
import Brightness4Icon from '@material-ui/icons/Brightness4'; | ||
import Brightness7Icon from '@material-ui/icons/Brightness7'; | ||
import { useDispatch, useSelector } from 'react-redux'; | ||
import { setAppThemeAction } from '@redux/actions/appThemeAction'; | ||
import { getThemeState } from '@redux/reducers/appThemeReducer'; | ||
import themeVariant from '@theme/variants'; | ||
import { IconButton } from '@material-ui/core'; | ||
|
||
const { | ||
custom: { | ||
blue: { solitude, licorice }, | ||
}, | ||
} = themeVariant; | ||
const SwitchMode = () => { | ||
interface IProps { | ||
isMobile?: boolean; | ||
} | ||
function SwitchMode({ isMobile }: IProps) { | ||
const dispatch = useDispatch(); | ||
const isDarkMode = useSelector(getThemeState).darkMode; | ||
const handleChangeMode = useCallback((event: ChangeEvent<HTMLInputElement>) => { | ||
const { checked: value } = event.target; | ||
dispatch(setAppThemeAction(value)); | ||
localStorage.setItem('darkMode', value ? 'true' : 'false'); | ||
}, []); | ||
const handleChangeMode = useCallback( | ||
(event: MouseEvent<HTMLButtonElement>) => { | ||
event.preventDefault(); | ||
dispatch(setAppThemeAction(!isDarkMode)); | ||
localStorage.setItem('darkMode', !isDarkMode ? 'true' : 'false'); | ||
}, | ||
[isDarkMode], | ||
); | ||
|
||
return ( | ||
<div> | ||
<FormControlLabel | ||
control={<Switch checked={isDarkMode} onChange={handleChangeMode} />} | ||
label={isDarkMode ? 'Light' : 'Dark'} | ||
style={{ color: isDarkMode ? solitude : licorice }} | ||
/> | ||
</div> | ||
<IconButton | ||
title="Toggle light/dark theme" | ||
onClick={handleChangeMode} | ||
style={{ | ||
fontSize: 'inherit', | ||
color: 'inherit', | ||
borderRadius: 15, | ||
width: isMobile ? '100%' : 'auto', | ||
}} | ||
> | ||
{isDarkMode ? ( | ||
<Brightness4Icon fill="white" style={{ fill: 'white' }} /> | ||
) : ( | ||
<Brightness7Icon /> | ||
)} | ||
{isMobile && <span style={{ paddingLeft: 8 }}>Toggle light/dark theme</span>} | ||
</IconButton> | ||
); | ||
} | ||
SwitchMode.defaultProps = { | ||
isMobile: false, | ||
}; | ||
|
||
export default SwitchMode; |
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
Oops, something went wrong.