-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathProjectCardHeader.tsx
More file actions
29 lines (24 loc) · 926 Bytes
/
ProjectCardHeader.tsx
File metadata and controls
29 lines (24 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { IProjectInfo } from "../interfaces/IProjectInfo";
interface IProjectCardHeader {
project: IProjectInfo;
}
const ProjectCardHeader: React.FC<IProjectCardHeader> = (props) => {
const { project } = props;
const updateUrlBase = process.env.PROJECT_UPDATE_URL_BASE;
return (
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between">
<h1 className="m-0 text-2xl">
{project.link ? <a className="external" href={project.link}>{project.name}</a> : project.name}
</h1>
{project.key && project.key.trim() !== "" && updateUrlBase && (
<a
className="bg-transparent !bg-none hover:bg-gltf-green font-semibold hover:text-white py-2 px-4 border border-slate-300 hover:border-transparent rounded"
href={updateUrlBase + project.key}
>
Update Project
</a>
)}
</div>
);
};
export default ProjectCardHeader;