-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2320 from DistributedCollective/development
Release 2022-07-11
- Loading branch information
Showing
78 changed files
with
11,879 additions
and
4,580 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Netlify Deployments |
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,54 @@ | ||
[dev] | ||
command = "yarn start" | ||
port = 8888 | ||
framework = "create-react-app" | ||
autoLaunch = true | ||
|
||
# Shared config for build | ||
[build] | ||
command = "yarn build" | ||
[build.environment] | ||
REACT_APP_INTERCOM_ID = "zxxit1rp" | ||
REACT_APP_NETWORK = "testnet" | ||
REACT_APP_PORTIS_ID = "469a25c8-1101-4c57-823d-c47cb328f788" | ||
REACT_APP_TRANSAK_ENV = "STAGING" | ||
REACT_APP_TRANSAK_API_KEY = "a2d23229-58f9-4ca5-a3d4-2c3d2b1b9a81" | ||
REACT_APP_ESTIMATOR_URI = "https://simulator.sovryn.app/simulate" | ||
REACT_APP_MAILCHIMP = "https://gmail.us17.list-manage.com/subscribe/post?u=e66850f0b51ebbdbe1f2c3e36&id=ef5d452839" | ||
REACT_APP_GRAPH_RSK = "https://subgraph.test.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph" | ||
|
||
[context.production] | ||
[context.production.environment] | ||
REACT_APP_NETWORK = "mainnet" | ||
REACT_APP_GOOGLE_ANALYTICS = "UA-192081564-1" | ||
REACT_APP_GRAPH_RSK = "https://subgraph.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph" | ||
REACT_APP_INFURA_KEY = "12b606df88b3420aad7828acd0f11902" | ||
REACT_APP_TRANSAK_ENV = "PRODUCTION" | ||
REACT_APP_TRANSAK_API_KEY = "fadc5140-4d8f-4eda-ab37-5999dfedf353" | ||
REACT_APP_ESTIMATOR_URI = "/simulate" | ||
BUILD_STORYBOOK = "true" | ||
|
||
# PR deployments (previews) | ||
[context.deploy-preview] | ||
[context.deploy-preview.environment] | ||
BUILD_STORYBOOK = "true" | ||
|
||
# Staging deployments (all branches) | ||
[context.branch-deploy] | ||
[context.branch-deploy.environment] | ||
REACT_APP_NETWORK = "mainnet" | ||
REACT_APP_GOOGLE_ANALYTICS = "UA-192081564-1" | ||
REACT_APP_GRAPH_RSK = "https://subgraph.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph" | ||
REACT_APP_INFURA_KEY = "12b606df88b3420aad7828acd0f11902" | ||
REACT_APP_TRANSAK_ENV = "PRODUCTION" | ||
REACT_APP_TRANSAK_API_KEY = "fadc5140-4d8f-4eda-ab37-5999dfedf353" | ||
REACT_APP_BYPASS_MAINTENANCE = "true" | ||
REACT_APP_STAGING = "true" | ||
|
||
# Testnet deployment | ||
[context.development] | ||
[context.development.environment] | ||
REACT_APP_NETWORK = "testnet" | ||
REACT_APP_GRAPH_RSK = "https://subgraph.test.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph" | ||
BUILD_STORYBOOK = "true" | ||
REACT_APP_STAGING = "false" |
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 @@ | ||
/* /index.html 200 |
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
38 changes: 18 additions & 20 deletions
38
src/app/components/ActiveUserLoanContainer/components/DisplayDate/index.tsx
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,42 +1,40 @@ | ||
import React from 'react'; | ||
import dayjs from 'dayjs'; | ||
|
||
export enum SeparatorType { | ||
Dash = 'dash', | ||
Break = 'break', | ||
Auto = 'auto', | ||
} | ||
|
||
const getSeparator = (separator: SeparatorType) => { | ||
switch (separator) { | ||
case SeparatorType.Break: | ||
return <br />; | ||
case SeparatorType.Auto: | ||
return ''; | ||
case SeparatorType.Dash: | ||
return '-'; | ||
default: | ||
return '-'; | ||
return ' -'; | ||
} | ||
}; | ||
|
||
interface Props { | ||
interface IDisplayDateProps { | ||
timestamp: string; | ||
timezoneOption?: string; | ||
timezoneLabel?: string; | ||
useUTC?: boolean; | ||
separator?: SeparatorType; | ||
} | ||
|
||
export function DisplayDate({ | ||
export const DisplayDate: React.FC<IDisplayDateProps> = ({ | ||
timestamp, | ||
timezoneOption = 'GMT', | ||
timezoneLabel = 'GMT', | ||
separator = SeparatorType.Break, | ||
}: Props) { | ||
const date = (timestamp: string) => new Date(Number(timestamp) * 1e3); | ||
const formatDate = date(timestamp).toLocaleString('en-GB', { | ||
timeZone: timezoneOption, | ||
}); | ||
separator = SeparatorType.Auto, | ||
useUTC = false, | ||
}) => { | ||
const stamp = dayjs.tz(Number(timestamp) * 1e3, 'UTC'); | ||
return ( | ||
<span> | ||
{formatDate.slice(0, 10)} {getSeparator(separator)}{' '} | ||
{formatDate.slice(12, 17)} {timezoneLabel} | ||
{useUTC | ||
? stamp.format(`YYYY/MM/DD${getSeparator(separator)} HH:mm [UTC]`) | ||
: stamp | ||
.tz(dayjs.tz.guess()) | ||
.format(`L${getSeparator(separator)} LT [UTC] Z`)} | ||
</span> | ||
); | ||
} | ||
}; |
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.