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

Commit

Permalink
changes: (#527)
Browse files Browse the repository at this point in the history
- fix for date picker selection issue along with colors
 - fix for disable start date picker

#517
  • Loading branch information
sk-enya authored Sep 23, 2021
1 parent b15080d commit 86b0248
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ function Deposits({ searchHistory, transactions }) {
)}
{paginatedDeposits.map((i, index) => {

if(i.depositL2 === false) return
if(i.depositL2 === false) {
return null
}

const typeTX = typeof(i.typeTX) === 'undefined' ? '' : i.typeTX
const activity = typeof(i.activity) === 'undefined' ? '' : ' (' + i.activity + ')'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ function Exits({ searchHistory, transactions, chainLink }) {
const renderExits = _exits.map((i, index) => {

//these are other types of transactions like approvals
if(i.exitL2 === false) return
if(i.exitL2 === false) {
return null
}

const chain = (i.chain === 'L1pending') ? 'L1' : i.chain

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function History() {
const isMobile = useMediaQuery(theme.breakpoints.down('md'));

const dispatch = useDispatch()
const [startDate, setStartDate] = useState(null)
const [endDate, setEndDate] = useState(null)
const [startDate, setStartDate] = useState(new Date())
const [endDate, setEndDate] = useState(new Date())

const [searchHistory, setSearchHistory] = useState('')

Expand All @@ -75,6 +75,9 @@ function History() {
});
}, POLL_INTERVAL * 2);

console.log(startDate)
console.log(endDate)

return (
<>
<PageHeader title="Transaction History" />
Expand All @@ -100,8 +103,8 @@ function History() {
selected={startDate}
onChange={(date) => setStartDate(date)}
selectsStart
startDate={startDate}
endDate={endDate}
endDate={new Date(endDate)}
maxDate={new Date(endDate)}
calendarClassName={theme.palette.mode}
placeholderText={isMobile ? "From" : ""}
popperClassName={styles.popperStyle}
Expand All @@ -114,9 +117,8 @@ function History() {
selected={endDate}
onChange={(date) => setEndDate(date)}
selectsEnd
startDate={startDate}
endDate={endDate}
minDate={startDate}
startDate={new Date(startDate)}
minDate={new Date(startDate)}
calendarClassName={theme.palette.mode}
placeholderText={isMobile ? "To" : ""}
popperClassName={styles.popperStyle}
Expand Down
11 changes: 11 additions & 0 deletions packages/omgx/wallet-frontend/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ $white500: rgba(255, 255, 255, 0.5);
color: #FFFFFF !important;
}

.react-datepicker__day--disabled {
opacity: 0.4
}
.react-datepicker__day {
&:hover {
background-color: transparent;
color: #fff;
border-radius: 50%;
border: 0.2px solid #CCFF00;
}
}
.react-datepicker__day--keyboard-selected,
.react-datepicker__month-text--keyboard-selected,
.react-datepicker__quarter-text--keyboard-selected,
Expand Down

0 comments on commit 86b0248

Please sign in to comment.