Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanuka-ChandraYapa committed Oct 23, 2023
1 parent 3572689 commit e94080e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 60 deletions.
6 changes: 0 additions & 6 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@
**If your issue was not created using the app above, it will be closed immediately.**
-->

<!--
Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:
👉 https://www.creative-tim.com/bundles
👉 https://www.creative-tim.com
-->
4 changes: 2 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// config.js
//const baseURL = "http://localhost:5000";
const baseURL = "http://localhost:5000";

const baseURL = "https://advizor-server-d27fd1ef5a20.herokuapp.com";
// const baseURL = "https://advizor-server-d27fd1ef5a20.herokuapp.com";
export default baseURL;
10 changes: 9 additions & 1 deletion src/layouts/upload/inputImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,15 @@ const ImageUploader = () => {
Submit
</MDButton>
{loading && (
<div style={{ marginTop: "5px" }}>
<div
style={{
marginTop: "5px",
display: "flex",
flexDirection: "column", // Stack children vertically
alignItems: "center", // Center horizontally
justifyContent: "center", // Center vertically
}}
>
<MDTypography variant="h4" fontWeight="regular" color="dark">
Analyzing...
</MDTypography>
Expand Down
13 changes: 9 additions & 4 deletions src/layouts/upload/inputPDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,18 @@ const PDFUploader = () => {
Submit
</MDButton>
{loading && (
<div style={{ marginTop: "5px" }}>
<div
style={{
marginTop: "5px",
display: "flex",
flexDirection: "column", // Stack children vertically
alignItems: "center", // Center horizontally
justifyContent: "center", // Center vertically
}}
>
<MDTypography variant="h4" fontWeight="regular" color="dark">
Analyzing...
</MDTypography>
{/* <LinearProgress /> */}
<Loading type="bars" color="#755BB4" />
</div>
)}
Expand All @@ -149,12 +156,10 @@ const PDFUploader = () => {
<MDButton
color="primary"
onClick={() => {
// Define the query parameter object with the locations
const queryParams = {
locations: responseItem[0].join(", "),
};

// Navigate to the '/advertisement_map' route with query parameters
navigate(`/advertisement_map?locations=${queryParams.locations}`);
}}
>
Expand Down
47 changes: 0 additions & 47 deletions src/layouts/upload/inputURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,60 +178,13 @@ function InputURL() {
<MDTypography variant="h4" fontWeight="regular" color="dark">
Analyzing...
</MDTypography>
{/* <LinearProgress /> */}
<Loading type="bars" color="#755BB4" />
</div>
)}

{backendResponse.length > 0 && (
<MDBox mt={5} mb={3} alignItems="center" fullWidth>
<RenderResults backendResponse={backendResponse} />
{/* <Card elevation={3} style={{ padding: "16px", marginBottom: "16px" }}>
<MDTypography variant="body1">Title: {backendResponse[0]}</MDTypography>
</Card>
<Card elevation={3} style={{ padding: "16px", marginBottom: "16px" }}>
<MDTypography variant="body1">Text: {backendResponse[1]}</MDTypography>
</Card>
<Card elevation={3} style={{ padding: "16px", marginBottom: "16px" }}>
<MDTypography variant="body1">Summary: {backendResponse[2]}</MDTypography>
</Card>
<Card elevation={3} style={{ padding: "16px", marginBottom: "16px" }}>
<MDTypography variant="body1">Keywords: {backendResponse[3].join(", ")}</MDTypography>
</Card>
<Card elevation={3} style={{ padding: "16px", marginBottom: "16px" }}>
<MDTypography variant="body1">Category: {backendResponse[4]}</MDTypography>
</Card>
<Card elevation={3} style={{ padding: "16px", marginBottom: "16px" }}>
<MDTypography variant="body1">Price: {backendResponse[5]}</MDTypography>
</Card>
<Card elevation={3} style={{ padding: "16px", marginBottom: "16px" }}>
<MDTypography variant="body1">Contact: {backendResponse[6]}</MDTypography>
</Card>
{backendResponse[7].length > 0 && (
<Card elevation={3} style={{ padding: "16px" }}>
<div
style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}
>
<MDTypography variant="body1">
Locations: {backendResponse[7].join(", ")}
</MDTypography>
<MDButton
color="primary"
onClick={() => {
// Define the query parameter object with the locations
const queryParams = {
locations: backendResponse[7].join(", "),
};
// Navigate to the '/advertisement_map' route with query parameters
navigate(`/advertisement_map?locations=${queryParams.locations}`);
}}
>
View Locations
</MDButton>
</div>
</Card>
)} */}
</MDBox>
)}
</MDBox>
Expand Down

0 comments on commit e94080e

Please sign in to comment.