Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/packages/design/src/Icon/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const ChatBubble = makeFontIcon(
'ChatBubble',
'icon-chat_bubble_outline'
);
export const Chart = makeFontIcon('Chart', 'icon-chart-bars');
export const Check = makeFontIcon('Check', 'icon-check');
export const ChevronCircleDown = makeFontIcon(
'ChevronCircleDown',
Expand Down Expand Up @@ -233,7 +234,6 @@ export const SettingsOverscan = makeFontIcon(
'icon-settings_overscan'
);
export const Share = makeFontIcon('Share', 'icon-share');
export const Shart = makeFontIcon('Shart', 'icon-chart-bars');
export const ShieldCheck = makeFontIcon('ShieldCheck', 'icon-shield-check');
export const Shrink = makeFontIcon('Shrink', 'icon-shrink');
export const SmallArrowDown = makeFontIcon(
Expand Down
2 changes: 1 addition & 1 deletion web/packages/design/src/Icon/Icon.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const ListOfIcons = () => (
<IconBox IconCmpt={Icon.CarrotUp} text="CarrotUp" />
<IconBox IconCmpt={Icon.Cash} text="Cash" />
<IconBox IconCmpt={Icon.ChatBubble} text="ChatBubble" />
<IconBox IconCmpt={Icon.Chart} text="Chart" />
<IconBox IconCmpt={Icon.Check} text="Check" />
<IconBox IconCmpt={Icon.ChevronCircleDown} text="ChevronCircleDown" />
<IconBox IconCmpt={Icon.ChevronCircleLeft} text="ChevronCircleLeft" />
Expand Down Expand Up @@ -164,7 +165,6 @@ export const ListOfIcons = () => (
/>
<IconBox IconCmpt={Icon.SettingsOverscan} text="SettingsOverscan" />
<IconBox IconCmpt={Icon.Share} text="Share" />
<IconBox IconCmpt={Icon.Shart} text="Shart" />
<IconBox IconCmpt={Icon.ShieldCheck} text="ShieldCheck" />
<IconBox IconCmpt={Icon.Shrink} text="Shrink" />
<IconBox IconCmpt={Icon.SmallArrowDown} text="SmallArrowDown" />
Expand Down
2 changes: 1 addition & 1 deletion web/packages/shared/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ limitations under the License.

const cfg = {
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',

dateFormat: 'yyyy-MM-dd',
shortFormat: 'MMM dd, yyyy',
};

export default cfg;
16 changes: 16 additions & 0 deletions web/packages/shared/services/loc/loc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ const isTest = process.env.NODE_ENV === 'test';

const logger = Logger.create('services/loc');

// displayUnixDate accepts a unix timestamp and returns formatted as 'yyyy-MM-dd'
export function displayUnixDate(seconds: number) {
// Multiply by 1000 b/c date constructor expects milliseconds.
const date = new Date(seconds * 1000);

return displayDate(date);
}

// displayDate accepts a date and returns formatted as 'yyyy-MM-dd'
export function displayDate(date: Date) {
try {
if (isTest) {
Expand All @@ -42,6 +44,20 @@ export function displayDate(date: Date) {
}
}

// displayShortDate accepts a date and returns formatted as 'MM dd, yyyy'
export function displayShortDate(date: Date) {
try {
if (isTest) {
return format(dateToUtc(date), cfg.shortFormat);
}
return format(date, cfg.shortFormat);
} catch (err) {
logger.error('displayDate()', err);
return 'undefined';
}
}

// displayDateTime accepts a date and returns formatted as 'yyyy-MM-dd HH:mm:ss'
export function displayDateTime(date: Date) {
try {
if (isTest) {
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3112,6 +3112,18 @@
regenerator-runtime "^0.13.7"
resolve-from "^5.0.0"

"@stripe/react-stripe-js@^1.16.5":
version "1.16.5"
resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-1.16.5.tgz#51cf862b50ca91ae6193c77a5bec889e81047f10"
integrity sha512-lVPW3IfwdacyS22pP+nBB6/GNFRRhT/4jfgAK6T2guQmtzPwJV1DogiGGaBNhiKtSY18+yS8KlHSu+PvZNclvQ==
dependencies:
prop-types "^15.7.2"

"@stripe/stripe-js@^1.48.0":
version "1.52.1"
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-1.52.1.tgz#d821bcd627a34227c20fe87d7c8f8bd4386eaf2e"
integrity sha512-fza40OPSpGQlFxc5TZWiYC/6Lk89Sep1fLuv9ss33YS6lCAF8UZbfA1E6W+lwO4c7WRKZIZumHIEbPJfP/O9uw==

"@swc/core-darwin-arm64@1.3.36":
version "1.3.36"
resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.36.tgz#37f15d0edda0e78837bdab337d69777d2fecfa40"
Expand Down