diff --git a/packages/frontend/src/assets/deployments.json b/packages/frontend/src/assets/deployments.json new file mode 100644 index 00000000..6034e7e2 --- /dev/null +++ b/packages/frontend/src/assets/deployments.json @@ -0,0 +1,38 @@ +[ + { + "title": "nextjs-bolerplate-9t44zbky4dg-bygideon-projects", + "status": "Building", + "environment": "Production", + "branch": "prod", + "commit": { + "hash": "9haif19", + "message": "Update hover state" + }, + "author": "Gideon", + "updatedAt": "2023-12-11T04:20:00" + }, + { + "title": "nextjs-bolerplate-9232dwky4dg-bygideon-projects", + "status": "Ready", + "environment": "Preview", + "branch": "prod", + "commit": { + "hash": "43de569", + "message": "Fix lint errors" + }, + "author": "Brad", + "updatedAt": "2023-12-11T04:20:00" + }, + { + "title": "nextjs-bolerplate-9saa22y4dg-bygideon-projects", + "status": "Error", + "environment": "Production", + "branch": "main", + "commit": { + "hash": "4hdsf19", + "message": "Apply style to button" + }, + "author": "Alice", + "updatedAt": "2023-12-11T04:20:00" + } +] diff --git a/packages/frontend/src/components/DeploymentDetailsCard.tsx b/packages/frontend/src/components/DeploymentDetailsCard.tsx new file mode 100644 index 00000000..8cb52ee2 --- /dev/null +++ b/packages/frontend/src/components/DeploymentDetailsCard.tsx @@ -0,0 +1,48 @@ +import React from 'react'; + +import { relativeTime } from '../utils/time'; + +interface DeploymentDetails { + title: string; + status: string; + environment: string; + branch: string; + commit: { + hash: string; + message: string; + }; + author: string; + updatedAt: string; +} + +interface DeployDetailsCardProps { + deployment: DeploymentDetails; +} + +const DeployDetailsCard = ({ deployment }: DeployDetailsCardProps) => { + return ( +
{deployment.title}
+{deployment.status}
+{deployment.environment}
+{deployment.branch}
++ {deployment.commit.hash} {deployment.commit.message} +
++ {relativeTime(deployment.updatedAt)} ^ {deployment.author} +
+ +Domain
- + {project.domain ?{project.domain}
: }Source
diff --git a/packages/frontend/src/components/Sidebar.tsx b/packages/frontend/src/components/Sidebar.tsx index d01fd17b..f8d14cff 100644 --- a/packages/frontend/src/components/Sidebar.tsx +++ b/packages/frontend/src/components/Sidebar.tsx @@ -1,12 +1,14 @@ import React from 'react'; -import { NavLink } from 'react-router-dom'; +import { Link, NavLink } from 'react-router-dom'; const Sidebar = () => { return (- Contrary to popular belief, Lorem Ipsum is not simply random text. -
-