diff --git a/frontend/src/components/SqueakDetailItem/SqueakDetailItem.js b/frontend/src/components/SqueakDetailItem/SqueakDetailItem.js
index 25bf290d..8d1e18f0 100644
--- a/frontend/src/components/SqueakDetailItem/SqueakDetailItem.js
+++ b/frontend/src/components/SqueakDetailItem/SqueakDetailItem.js
@@ -28,10 +28,7 @@ import ZoomInIcon from '@material-ui/icons/ZoomIn';
import useStyles from "./styles";
import Widget from "../../components/Widget";
-import MakeSqueakDialog from "../../components/MakeSqueakDialog";
-import DeleteSqueakDialog from "../../components/DeleteSqueakDialog";
-import BuySqueakDialog from "../../components/BuySqueakDialog";
-import SqueakDetailsDialog from "../../components/SqueakDetailsDialog";
+
import {
@@ -50,61 +47,18 @@ export default function SqueakDetailItem({
network,
handleReplyClick,
handleDeleteClick,
+ handleViewDetailsClick,
+ handleUnlockClick,
...props
}) {
var classes = useStyles();
const history = useHistory();
- const [replyDialogOpen, setReplyDialogOpen] = useState(false);
- const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
- const [buyDialogOpen, setBuyDialogOpen] = useState(false);
- const [viewDetailsDialogOpen, setViewDetailsDialogOpen] = useState(false);
-
- const handleClickOpen = () => {
- setReplyDialogOpen(true);
- };
-
- const handleClose = () => {
- setReplyDialogOpen(false);
- };
-
- const handleClickOpenDeleteDialog = () => {
- setDeleteDialogOpen(true);
- console.log("deleteDialogOpen: " + deleteDialogOpen);
- };
-
- const handleCloseDeleteDialog = () => {
- setDeleteDialogOpen(false);
- };
-
- const handleClickOpenBuyDialog = () => {
- setBuyDialogOpen(true);
- };
-
- const handleCloseBuyDialog = () => {
- setBuyDialogOpen(false);
- };
-
- const handleClickOpenViewDetailsDialog = () => {
- setViewDetailsDialogOpen(true);
- };
-
- const handleCloseViewDetailsDialog = () => {
- setViewDetailsDialogOpen(false);
- };
const goToSqueakAddressPage = () => {
history.push("/app/squeakaddress/" + squeak.getAuthorAddress());
};
- const goToBuyPage = (hash) => {
- history.push("/app/buy/" + hash);
- };
-
- const goToSqueakDetailPage = () => {
- history.push("/app/squeakdetail/" + hash);
- };
-
const reloadRoute = () => {
history.go(0);
};
@@ -130,7 +84,7 @@ export default function SqueakDetailItem({
if (!squeak) {
return;
}
- handleClickOpen();
+ handleReplyClick();
}
const onDeleteClick = (event) => {
@@ -139,7 +93,7 @@ export default function SqueakDetailItem({
if (!squeak) {
return;
}
- handleClickOpenDeleteDialog();
+ handleDeleteClick();
}
const onZoomInClick = (event) => {
@@ -150,7 +104,7 @@ export default function SqueakDetailItem({
}
//handleClickOpenDeleteDialog();
// goToSqueakDetailPage();
- handleClickOpenViewDetailsDialog();
+ handleViewDetailsClick();
}
const onUnlockClick = (event) => {
@@ -160,7 +114,7 @@ export default function SqueakDetailItem({
return;
}
// goToBuyPage(squeak.getSqueakHash());
- handleClickOpenBuyDialog();
+ handleUnlockClick();
}
const onDownloadClick = (event) => {
@@ -282,54 +236,6 @@ export default function SqueakDetailItem({
)
}
- function MakeSqueakDialogContent() {
- return (
- <>
-
=p&&f<=d}return c?vc({},t,{radius:i,angle:Tc(f,t)}):null};function wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ac(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rc(e){return(Rc="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nc(){return(Nc=Object.assign||function(e){for(var t=1;t=0}));if(g&&g.length){var v=g[0].props.barSize,b=g[0].props[h];a[b]||(a[b]=[]),a[b].push({item:g[0],stackList:g.slice(1),barSize:m()(v)?t:v})}}return a}({barSize:u,stackGroups:a}),E=[];return r.forEach((function(r,u){var g,S=n.constructor.getDisplayedData(e,{dataStartIndex:l,dataEndIndex:c},r),x=r.props,O=x.dataKey,T=x.maxBarSize,C=r.props["".concat(v,"Id")],w=r.props["".concat(b,"Id")],A=i.reduce((function(e,n){var a,i=t["".concat(n.axisType,"Map")],o=r.props["".concat(n.axisType,"Id")],s=i&&i[o];return dg({},e,(pg(a={},n.axisType,s),pg(a,"".concat(n.axisType,"Ticks"),tc(s)),a))}),{}),R=A[b],N=A["".concat(b,"Ticks")],M=a&&a[C]&&a[C].hasStack&&function(e,t){var n=e.props.stackId;if(I(n)){var r=t[n];if(r&&r.items.length){for(var a=-1,i=0,o=r.items.length;i