removing epoch on settings and fixing divider position
This commit is contained in:
+12
-8
@@ -38,7 +38,6 @@ import { LoadingModal } from 'src/components/Modals/LoadingModal';
|
||||
export const ParametersSettings = ({ bondedNode }: { bondedNode: TBondedMixnode }): JSX.Element => {
|
||||
const [openConfirmationModal, setOpenConfirmationModal] = useState<boolean>(false);
|
||||
const [intervalTime, setIntervalTime] = useState<string>();
|
||||
const [nextEpoch, setNextEpoch] = useState<string>();
|
||||
const [pendingUpdates, setPendingUpdates] = useState<MixNodeCostParams>();
|
||||
const { clientDetails } = useContext(AppContext);
|
||||
const theme = useTheme();
|
||||
@@ -65,7 +64,6 @@ export const ParametersSettings = ({ bondedNode }: { bondedNode: TBondedMixnode
|
||||
const getNextInterval = async () => {
|
||||
try {
|
||||
const { intervalTime, nextEpoch } = await getIntervalAsDate();
|
||||
setNextEpoch(nextEpoch);
|
||||
setIntervalTime(intervalTime);
|
||||
} catch {
|
||||
console.log('cant retrieve next interval');
|
||||
@@ -123,7 +121,16 @@ export const ParametersSettings = ({ bondedNode }: { bondedNode: TBondedMixnode
|
||||
};
|
||||
|
||||
return (
|
||||
<Grid container xs item>
|
||||
<Grid
|
||||
container
|
||||
xs
|
||||
item
|
||||
sx={{
|
||||
'& .MuiGrid-item': {
|
||||
pl: 0,
|
||||
},
|
||||
}}
|
||||
>
|
||||
{fee && (
|
||||
<ConfirmTx
|
||||
open
|
||||
@@ -138,9 +145,6 @@ export const ParametersSettings = ({ bondedNode }: { bondedNode: TBondedMixnode
|
||||
<Alert
|
||||
title={
|
||||
<>
|
||||
<Box component="span" sx={{ fontWeight: 600, mr: 2 }}>
|
||||
{`Next epoch ${nextEpoch}`}
|
||||
</Box>
|
||||
<Box component="span" sx={{ fontWeight: 600 }}>{`Next interval: ${intervalTime}`}</Box>
|
||||
</>
|
||||
}
|
||||
@@ -192,7 +196,7 @@ export const ParametersSettings = ({ bondedNode }: { bondedNode: TBondedMixnode
|
||||
</Grid>
|
||||
)}
|
||||
</Grid>
|
||||
<Divider flexItem />
|
||||
<Divider flexItem sx={{ position: 'relative', left: '-24px', width: 'calc(100% + 24px)' }} />
|
||||
<Grid item container direction="row" alignItems="left" justifyContent="space-between" padding={3} spacing={1}>
|
||||
<Grid item>
|
||||
<Typography variant="body1" sx={{ fontWeight: 600, mb: 1 }}>
|
||||
@@ -235,7 +239,7 @@ export const ParametersSettings = ({ bondedNode }: { bondedNode: TBondedMixnode
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Divider flexItem />
|
||||
<Divider flexItem sx={{ position: 'relative', left: '-24px', width: 'calc(100% + 24px)' }} />
|
||||
<Grid container justifyContent="end">
|
||||
<Button
|
||||
size="large"
|
||||
|
||||
@@ -10,7 +10,7 @@ export const getIntervalAsDate = async () => {
|
||||
add(new Date(), {
|
||||
seconds: secondsToNextInterval,
|
||||
}),
|
||||
'MM/dd/yyyy HH:mm',
|
||||
'MM/dd/yyyy, HH:mm',
|
||||
);
|
||||
const nextEpoch = format(
|
||||
add(fromUnixTime(Number(interval.current_epoch_start_unix)), {
|
||||
|
||||
Reference in New Issue
Block a user