Skip to content

Commit ae01f35

Browse files
authored
Minor improvements (#52)
1 parent d98fba5 commit ae01f35

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ ENV WS_CONTRACTS_CHAIN="ws://127.0.0.1:9920"
1111

1212
# Given that Coretime-Mock deploys the contract with no salt we can be sure
1313
# this is the address as long as it is not modified.
14-
ENV CONTRACT_XC_REGIONS="Z6UFD3Z58WxVVoqggtsCAQoXxQwiZKUftmrd2QzrSbagr8r"
15-
ENV CONTRACT_MARKET="WMFn89f2V8xzfXwLfvHnhXS3jUettejFzqC4TWYir9hTkDd"
14+
ENV CONTRACT_XC_REGIONS="a6MrRfHbpmHr8StUEk2CfFNBCWcy12VPorZJjwmache2zP6"
15+
ENV CONTRACT_MARKET="aCo3ajA3ST2y188ghkhysZdfPyfkEJfU5kVDvaRc4HXBgtq"
1616

1717
RUN apk add --no-cache libc6-compat
1818

src/components/elements/MarketFilters/DurationFilter.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const DurationFilter = ({ filters, updateFilters }: FilterProps) => {
2121
};
2222

2323
const options: Option[] = [
24-
{ duration: Number.MAX_VALUE, label: 'Show All' },
24+
{ duration: 0, label: 'Show All' },
2525
{ duration: WEEK_IN_TIMESLICES, label: '1 week' },
2626
{ duration: 2 * WEEK_IN_TIMESLICES, label: '2 weeks' },
2727
{ duration: 3 * WEEK_IN_TIMESLICES, label: '3 weeks' },
@@ -38,13 +38,13 @@ const DurationFilter = ({ filters, updateFilters }: FilterProps) => {
3838
updateFilters({
3939
...filters,
4040
durationFilter: (listing) =>
41-
listing.region.getEnd() - listing.region.getBegin() <= duration,
41+
listing.region.getEnd() - listing.region.getBegin() >= duration,
4242
});
4343
};
4444

4545
return (
4646
<Box width={200}>
47-
<Typography marginBottom={'.5em'}>Region Duration</Typography>
47+
<Typography marginBottom={'.5em'}>Region duration at least</Typography>
4848
<FormControl fullWidth>
4949
<InputLabel id='range-dropdown-label'>Range</InputLabel>
5050
<Select

src/components/elements/MarketFilters/PriceFilter.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ const PriceFilter = ({ listings, filters, updateFilters }: FilterProps) => {
2626

2727
return (
2828
<Box>
29-
<Typography textAlign={'center'}>
30-
Price Limit: {`${priceLimit} ROC`}
31-
</Typography>
3229
<Slider
3330
defaultValue={70}
3431
max={maxValue()}
@@ -39,6 +36,9 @@ const PriceFilter = ({ listings, filters, updateFilters }: FilterProps) => {
3936
valueLabelDisplay='off'
4037
valueLabelFormat={(value) => `${value} ROC`}
4138
/>
39+
<Typography variant='h2' textAlign={'center'}>
40+
Price Limit: {`${priceLimit} ROC`}
41+
</Typography>
4242
</Box>
4343
);
4444
};

src/components/elements/MarketFilters/RegionEndFilter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const RegionEndFilter = ({ filters, updateFilters }: FilterProps) => {
4747
return (
4848
<>
4949
<LocalizationProvider dateAdapter={AdapterDateFns}>
50-
<Typography marginBottom={'.5em'}>Region End</Typography>
50+
<Typography marginBottom={'.5em'}>Region ends by</Typography>
5151
<DatePicker
5252
label='Select date'
5353
value={selectedEnd}

src/components/elements/MarketFilters/RegionStartFilter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const RegionStartFilter = ({ filters, updateFilters }: FilterProps) => {
4747
return (
4848
<>
4949
<LocalizationProvider dateAdapter={AdapterDateFns}>
50-
<Typography marginBottom={'.5em'}>Region Start</Typography>
50+
<Typography marginBottom={'.5em'}>Region starts by</Typography>
5151
<DatePicker
5252
label='Select date'
5353
value={selectedStart}

src/components/elements/RegionCard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const RegionCardInner = ({
8585
// Create formatter (English).
8686
const timeAgo = new TimeAgo('en-US');
8787

88-
const formatDuration = humanizer();
88+
const formatDuration = humanizer({ units: ['w', 'd', 'h'], round: true });
8989
const { region, taskId, location, currentUsage, consumed, coreOccupancy } =
9090
regionMetadata;
9191
const theme = useTheme();

src/pages/regions.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const Dashboard = () => {
106106
};
107107

108108
return (
109-
<Box sx={{ display: 'flex', height: '100%', gap: '1rem' }}>
109+
<Box sx={{ display: 'flex', height: '100%', gap: '1rem', justifyContent: 'space-between' }}>
110110
<Box sx={{ maxWidth: '45rem', flexGrow: 1, overflow: 'auto' }}>
111111
<Box>
112112
<Typography
@@ -158,13 +158,12 @@ const Dashboard = () => {
158158
</Box>
159159
<Box
160160
sx={{
161-
position: 'fixed',
162-
right: '7.5rem',
161+
borderRadius: '.5rem',
163162
color: theme.palette.text.secondary,
164163
background: theme.palette.background.default,
165164
minWidth: 280,
166165
height: 500,
167-
margin: 'auto',
166+
marginTop: '2rem',
168167
padding: '2rem 3rem',
169168
}}
170169
>

0 commit comments

Comments
 (0)