diff --git a/components/Dashboard/Card.js b/components/Dashboard/Card.js
index 5104b7f..c5bd162 100644
--- a/components/Dashboard/Card.js
+++ b/components/Dashboard/Card.js
@@ -29,8 +29,8 @@ const useStyles = makeStyles((theme) => ({
function Card({ bridge, index }) {
const classes = useStyles();
- const completedAt = (bridge.completedAt
- && new Date(bridge.completedAt).toDateString())
+ const latestRequest = (bridge.latestRequest
+ && new Date(bridge.latestRequest).toDateString())
|| 'No requests';
const updatedAt = new Date(bridge.updatedAt).toDateString();
@@ -72,7 +72,7 @@ function Card({ bridge, index }) {
- {completedAt}
+ {latestRequest}
@@ -126,9 +126,9 @@ Card.propTypes = {
title: PropTypes.string.isRequired,
updatedAt: PropTypes.string.isRequired,
eventCount: PropTypes.number.isRequired,
- completedAt: PropTypes.string,
+ latestRequest: PropTypes.string,
active: PropTypes.bool.isRequired,
- eventId: PropTypes.number.isRequired,
+ eventId: PropTypes.number,
}).isRequired,
index: PropTypes.number.isRequired,
};
diff --git a/components/Editor/BridgeTestCard/index.js b/components/Editor/BridgeTestCard/index.js
index 2be4427..7c85dc8 100644
--- a/components/Editor/BridgeTestCard/index.js
+++ b/components/Editor/BridgeTestCard/index.js
@@ -90,7 +90,6 @@ export default BridgeTestCard;
BridgeTestCard.propTypes = {
values: PropTypes.shape({
outboundUrl: PropTypes.string.isRequired,
- method: PropTypes.string.isRequired,
retries: PropTypes.string.isRequired,
delay: PropTypes.string.isRequired,
headers: PropTypes.arrayOf(
diff --git a/components/Editor/EnvironmentVariablesCard/index.js b/components/Editor/EnvironmentVariablesCard/index.js
index 081e590..e478d4a 100644
--- a/components/Editor/EnvironmentVariablesCard/index.js
+++ b/components/Editor/EnvironmentVariablesCard/index.js
@@ -56,9 +56,7 @@ function EnvironmentVariablesCard({ environmentVariables }) {
}
title="Environment variables"
- subtitle="Keep Your Secrets Safe"
- tooltip
- tooltipMessage="Environment variables are encrypted for data protection. You will not be able to view the value after saving."
+ subtitle="Encrypted To Keep Your Secrets Safe"
/>
diff --git a/components/Editor/PayloadCard/index.js b/components/Editor/PayloadCard/index.js
index 5fe238c..a970a91 100644
--- a/components/Editor/PayloadCard/index.js
+++ b/components/Editor/PayloadCard/index.js
@@ -65,7 +65,7 @@ function PayloadCard({ isEditView, values }) {
className={classes.payloadContainer}
>
-
+
@@ -85,7 +85,6 @@ PayloadCard.propTypes = {
isEditView: PropTypes.bool.isRequired,
values: PropTypes.shape({
outboundUrl: PropTypes.string.isRequired,
- method: PropTypes.string.isRequired,
retries: PropTypes.string.isRequired,
delay: PropTypes.string.isRequired,
headers: PropTypes.arrayOf(
diff --git a/components/Editor/index.js b/components/Editor/index.js
index bbaf676..6c937fb 100644
--- a/components/Editor/index.js
+++ b/components/Editor/index.js
@@ -203,27 +203,31 @@ function Editor({ bridge, isEditView }) {
Send your events here:
- {slug ? (`https://api.bridgeapi.dev/${slug}`) : ('Autogenerated on save')}
+ {slug ? `https://api.bridgeapi.dev/${slug}` : 'Autogenerated on save.'}
- setActionsDialogOpen(false)}
- bridgeSlug={slug}
- />
-
+ {slug && (
+ <>
+ setActionsDialogOpen(false)}
+ bridgeSlug={slug}
+ />
+
+ >
+ )}
@@ -313,7 +317,6 @@ Editor.propTypes = {
events: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.number.isRequired,
- bridge_id: PropTypes.number.isRequired,
completed: PropTypes.bool,
completed_at: PropTypes.string,
data: PropTypes.string,
diff --git a/components/Event/InboundAccordion.js b/components/Event/InboundAccordion.js
index 9ba2578..becce8e 100644
--- a/components/Event/InboundAccordion.js
+++ b/components/Event/InboundAccordion.js
@@ -101,7 +101,7 @@ function TimelineAccordion({ request }) {
Payload:
-
+
diff --git a/components/Event/OutboundAccordion.js b/components/Event/OutboundAccordion.js
index 574c356..ae77841 100644
--- a/components/Event/OutboundAccordion.js
+++ b/components/Event/OutboundAccordion.js
@@ -1,4 +1,5 @@
import PropTypes from 'prop-types';
+import React from 'react';
import {
Accordion,
AccordionDetails,
@@ -21,7 +22,7 @@ import CodeMirror from '../Codemirror';
import { hourMinutes } from '../../utils/formatDate';
-const useStyles = makeStyles({
+const useStyles = makeStyles((theme) => ({
root: {
width: '100%',
},
@@ -52,8 +53,9 @@ const useStyles = makeStyles({
},
bold: {
fontWeight: '700',
+ margin: theme.spacing(0, 1, 0, 2),
},
-});
+}));
function OutboundAccordion({ request }) {
const classes = useStyles();
@@ -97,24 +99,20 @@ function OutboundAccordion({ request }) {
Headers:
- {' '}
-
- {request.headers.map((header) => (
- -
-
- {header.key}
- :
-
- {' '}
-
- {header.value}
-
-
- ))}
-
-
+ {request.headers.map((header) => (
+
+
+ {header.key}
+ :
+
+
+ {header.value}
+
+
+ ))}
+
-
+
diff --git a/components/Event/ResponseAccordion.js b/components/Event/ResponseAccordion.js
index 8150467..4b22339 100644
--- a/components/Event/ResponseAccordion.js
+++ b/components/Event/ResponseAccordion.js
@@ -109,7 +109,7 @@ function ResponseAccordion({ request }) {
Payload:
-
+
diff --git a/components/Sidebar/ListItem.js b/components/Sidebar/ListItem.js
index 85fa622..6ff6d54 100644
--- a/components/Sidebar/ListItem.js
+++ b/components/Sidebar/ListItem.js
@@ -37,8 +37,13 @@ function ListItem({
export default ListItem;
ListItem.propTypes = {
- statusCode: PropTypes.number.isRequired,
- completedAt: PropTypes.string.isRequired,
+ statusCode: PropTypes.number,
+ completedAt: PropTypes.string,
completed: PropTypes.bool.isRequired,
eventId: PropTypes.number.isRequired,
};
+
+ListItem.defaultProps = {
+ statusCode: null,
+ completedAt: null,
+};
diff --git a/components/Sidebar/index.js b/components/Sidebar/index.js
index 5f0cfdc..e7d79ff 100644
--- a/components/Sidebar/index.js
+++ b/components/Sidebar/index.js
@@ -76,6 +76,7 @@ function Sidebar({ events, bridgeSlug, title }) {
statusCode={event.statusCode}
completed={event.completed}
eventId={event.id}
+ key={event.id}
/>
))
)}
diff --git a/components/shared/Footer/index.js b/components/shared/Footer/index.js
index e1d367e..ba2c45d 100644
--- a/components/shared/Footer/index.js
+++ b/components/shared/Footer/index.js
@@ -32,7 +32,7 @@ function Footer({ handleOpen }) {
-
+
About Us
diff --git a/pages/bridge/[id].js b/pages/bridge/[id].js
index 5077270..a6fe203 100644
--- a/pages/bridge/[id].js
+++ b/pages/bridge/[id].js
@@ -45,7 +45,7 @@ Show.propTypes = {
active: PropTypes.bool.isRequired,
slug: PropTypes.string.isRequired,
outboundUrl: PropTypes.string.isRequired,
- method: PropTypes.string.isRequired,
+ httpMethod: PropTypes.string.isRequired,
retries: PropTypes.number.isRequired,
delay: PropTypes.number.isRequired,
headers: PropTypes.arrayOf(
diff --git a/pages/dashboard.js b/pages/dashboard.js
index 7ea4c6a..00686c5 100644
--- a/pages/dashboard.js
+++ b/pages/dashboard.js
@@ -33,7 +33,13 @@ function Dashboard({ bridges }) {
{bridges && bridges.length > 0
- ? (bridges.map((bridge, idx) => ))
+ ? (bridges.map((bridge, idx) => (
+
+ )))
: (
{
const date = new Date(timestamp);
- const minutes = date.getMinutes();
+ let minutes = String(date.getMinutes());
let hour = date.getHours();
let amPm;
@@ -21,9 +21,16 @@ export const hourMinutes = (timestamp) => {
hour -= 12;
} else if (hour === 12) {
amPm = 'PM';
+ } else if (hour < 10) {
+ hour = `0${hour}`;
+ amPm = 'AM';
} else {
amPm = 'AM';
}
+ if (minutes.length === 1) {
+ minutes = `0${minutes}`;
+ }
+
return `${hour}:${minutes}${amPm}`;
};