diff --git a/frontend/src/components/AppGrid.jsx b/frontend/src/components/AppGrid.jsx index 54760432..562146c0 100644 --- a/frontend/src/components/AppGrid.jsx +++ b/frontend/src/components/AppGrid.jsx @@ -148,6 +148,8 @@ const AppGrid = props => { // setInnerHits(hits) //} + console.log("In appgrid") + return ( {hits.map((data, index) => { @@ -184,11 +186,11 @@ const AppGrid = props => { } parsedname = (parsedname.charAt(0).toUpperCase()+parsedname.substring(1)).replaceAll("_", " ") - + const appUrl = isCloud ? `/apps/${data.objectID}?queryID=${data.__queryID}` : `https://shuffler.io/apps/${data.objectID}?queryID=${data.__queryID}` return ( - + { setMouseHoverIndex(index) /* @@ -254,7 +256,7 @@ const AppGrid = props => { } - + ) diff --git a/frontend/src/components/CreatorGrid.jsx b/frontend/src/components/CreatorGrid.jsx index 6c83b134..66d852c5 100644 --- a/frontend/src/components/CreatorGrid.jsx +++ b/frontend/src/components/CreatorGrid.jsx @@ -53,6 +53,10 @@ const CreatorGrid = props => { const buttonStyle = {borderRadius: 30, height: 50, width: 220, margin: isMobile ? "15px auto 15px auto" : 20, fontSize: 18,} + const isCloud = + window.location.host === "localhost:3002" || + window.location.host === "shuffler.io"; + const innerColor = "rgba(255,255,255,0.65)" const borderRadius = 3 window.title = "Shuffle | Workflows | Discover your use-case" @@ -159,62 +163,64 @@ const CreatorGrid = props => { } counted += 1 + const creatorUrl = !isCloud ? `https://shuffler.io/creators/${data.username}` : `/creators/${data.username}` return ( - - -
- {"Creator - - @{data.username} - - - {data.verified === true ? - - - - : - null - } - -
- - {data.apps === undefined || data.apps === null ? 0 : data.apps} apps {data.workflows === null || data.workflows === undefined ? 0 : data.workflows} workflows - - {data.specialized_apps !== undefined && data.specialized_apps !== null && data.specialized_apps.length > 0 ? - - {data.specialized_apps.map((app, index) => { - // Putting all this in secondary of ListItemText looked weird. - return ( - + + {data.apps === undefined || data.apps === null ? 0 : data.apps} apps {data.workflows === null || data.workflows === undefined ? 0 : data.workflows} workflows + + {data.specialized_apps !== undefined && data.specialized_apps !== null && data.specialized_apps.length > 0 ? + + {data.specialized_apps.map((app, index) => { + // Putting all this in secondary of ListItemText looked weird. + return ( +
{ + console.log("Click") + //navigate("/apps/"+app.id) + }} + > + + + +
+ ) + })} +
+ : + null} +
+
+
-
) diff --git a/frontend/src/components/WorkflowPaper.jsx b/frontend/src/components/WorkflowPaper.jsx index f0a06e87..558de437 100644 --- a/frontend/src/components/WorkflowPaper.jsx +++ b/frontend/src/components/WorkflowPaper.jsx @@ -63,6 +63,10 @@ const WorkflowPaper = (props) => { const [anchorEl, setAnchorEl] = React.useState(null); const appGroup = data.action_references === undefined || data.action_references === null ? [] : data.action_references + const isCloud = + window.location.host === "localhost:3002" || + window.location.host === "shuffler.io"; + //console.log("Workflow: ", data) var boxColor = "#86c142"; @@ -96,6 +100,10 @@ const WorkflowPaper = (props) => { parsedUrl += `?queryID=${data.__queryID}` } + if (!isCloud) { + parsedUrl = `https://shuffler.io${parsedUrl}` + } + return (
@@ -137,12 +145,14 @@ const WorkflowPaper = (props) => { flex: 10, }} > - {parsedName} - +