Skip to content

Commit

Permalink
Use DateTooltip from snew-classic-ui (decred#863)
Browse files Browse the repository at this point in the history
* Use DateTooltip from snew-classic-ui

* upgrade dependencies
  • Loading branch information
tiagoalvesdulce authored and fernandoabolafio committed Nov 7, 2018
1 parent 29b1fe1 commit 2a693c2
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 50 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"showdown": "^1.8.3",
"snew-classic-ui": "https://github.com/decred/snew-classic-ui",
"source-map-explorer": "^1.6.0",
"timeago-react": "^1.2.2",
"tweetnacl": "^1.0.0",
"tweetnacl-util": "^0.15.0",
"xss-filters": "^1.2.7"
Expand Down
19 changes: 2 additions & 17 deletions src/components/snew/ThingLink.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import TimeAgo from "timeago-react";
import { DateTooltip } from "snew-classic-ui";
import ProposalImages from "../ProposalImages";
import DownloadBundle from "../DownloadBundle";
import Message from "../Message";
Expand Down Expand Up @@ -184,22 +184,7 @@ class ThingLinkComp extends React.Component {
<span className="tagline">
<span className="submitted-by">
{hasBeenUpdated ? "updated " : "submitted "}
<Tooltip
text={new Date(created_utc * 1000).toLocaleString()}
wrapperStyle={{
display: "inline"
}}
tipStyle={{
right: "-10px",
top: "20px",
width: "100px",
textAlign: "center"
}}>
<TimeAgo
style={{ cursor: "pointer" }}
datetime={created_utc * 1000}
/>
</Tooltip>
<DateTooltip createdAt={created_utc} />
{author &&
<span>
{" by "}
Expand Down
6 changes: 0 additions & 6 deletions src/components/snew/Timestamp.js

This file was deleted.

1 change: 0 additions & 1 deletion src/components/snew/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ export const Thing = comps.Thing = snew(comps.Thing);
export const ThingComment = comps.ThingComment = snew(comps.ThingComment);
export const ThingLink = comps.ThingLink = snew(comps.ThingLink);
export const UserInfo = comps.UserInfo = snew(comps.UserInfo);
export const Timestamp = comps.Timestamp;
1 change: 0 additions & 1 deletion src/components/snew/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const SubmitLinkSidebox = Blank;
export { default as SubmitTextSidebox } from "./SubmitTextSidebox";
export { default as Subreddit } from "./Subreddit";
export { default as Thing } from "./Thing";
export { default as Timestamp } from "./Timestamp";
export { default as ThingComment } from "./ThingComment";
export { default as ThingLink } from "./ThingLink";
export { default as UserInfo } from "./UserInfo";
Expand Down
53 changes: 29 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.4:
optionalDependencies:
fsevents "^1.2.2"

chownr@^1.0.1:
chownr@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"

Expand Down Expand Up @@ -3283,7 +3283,7 @@ extsprintf@^1.2.0:

fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
resolved "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"

fast-deep-equal@^2.0.1:
version "2.0.1"
Expand Down Expand Up @@ -3755,7 +3755,11 @@ got@^6.7.1:
unzip-response "^2.0.1"
url-parse-lax "^1.0.0"

graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4:
version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"

graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"

Expand Down Expand Up @@ -5641,14 +5645,14 @@ minimist@~0.0.1:
version "0.0.10"
resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"

minipass@^2.2.1, minipass@^2.3.3:
version "2.3.4"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957"
minipass@^2.2.1, minipass@^2.3.4:
version "2.3.5"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848"
dependencies:
safe-buffer "^5.1.2"
yallist "^3.0.0"

minizlib@^1.1.0:
minizlib@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.1.tgz#6734acc045a46e61d596a43bb9d9cd326e19cc42"
dependencies:
Expand Down Expand Up @@ -6860,8 +6864,8 @@ raf@3.4.0, raf@^3.4.0:
performance-now "^2.1.0"

randomatic@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116"
version "3.1.1"
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed"
dependencies:
is-number "^4.0.0"
kind-of "^6.0.0"
Expand Down Expand Up @@ -7348,7 +7352,7 @@ registry-url@^3.0.3:

regjsgen@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
resolved "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"

regjsparser@^0.1.4:
version "0.1.5"
Expand Down Expand Up @@ -7578,7 +7582,7 @@ safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s

safe-regex@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
resolved "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
dependencies:
ret "~0.1.10"

Expand Down Expand Up @@ -7802,7 +7806,7 @@ snapdragon@^0.8.1:

"snew-classic-ui@https://github.com/decred/snew-classic-ui":
version "0.1.9"
resolved "https://github.com/decred/snew-classic-ui#364f14b79f586dc3365929c696b94c885c8b8da0"
resolved "https://github.com/decred/snew-classic-ui#673765e200c18d683c4cfc36f88707e3682b4c38"
dependencies:
babel-cli "^6.26.0"
babel-core "6.26.3"
Expand All @@ -7812,6 +7816,7 @@ snapdragon@^0.8.1:
babel-preset-react "^6.24.1"
node-less "^1.0.0"
node-less-chokidar "^0.3.1"
timeago-react "^2.0.0"

sockjs-client@1.1.5:
version "1.1.5"
Expand Down Expand Up @@ -7923,8 +7928,8 @@ spdx-expression-parse@^3.0.0:
spdx-license-ids "^3.0.0"

spdx-license-ids@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz#e2a303236cac54b04031fa7a5a79c7e701df852f"
version "3.0.2"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz#a59efc09784c2a5bada13cfeaf5c75dd214044d2"

spdy-transport@^2.0.18:
version "2.1.0"
Expand Down Expand Up @@ -7960,8 +7965,8 @@ sprintf-js@~1.0.2:
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"

sshpk@^1.7.0:
version "1.15.1"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.1.tgz#b79a089a732e346c6e0714830f36285cd38191a2"
version "1.15.2"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629"
dependencies:
asn1 "~0.2.3"
assert-plus "^1.0.0"
Expand Down Expand Up @@ -8228,13 +8233,13 @@ tapable@^0.2.7:
resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22"

tar@^4:
version "4.4.6"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b"
version "4.4.7"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.7.tgz#14df45023ffdcd0c233befa2fc01ebb76ee39e7c"
dependencies:
chownr "^1.0.1"
chownr "^1.1.1"
fs-minipass "^1.2.5"
minipass "^2.3.3"
minizlib "^1.1.0"
minipass "^2.3.4"
minizlib "^1.1.1"
mkdirp "^0.5.0"
safe-buffer "^5.1.2"
yallist "^3.0.2"
Expand Down Expand Up @@ -8286,9 +8291,9 @@ time-stamp@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.1.0.tgz#6c5c0b2bc835a244616abcfddf81ce13a1975c9f"

timeago-react@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/timeago-react/-/timeago-react-1.2.2.tgz#249b475dcf4c44284284541c600f8cf04674bf5b"
timeago-react@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/timeago-react/-/timeago-react-2.0.0.tgz#01ed7cea809a0e03706c6ec5602bfd29f76d8e49"
dependencies:
timeago.js "^3.0.1"

Expand Down

0 comments on commit 2a693c2

Please sign in to comment.