Add Edit button in the roadmap list

feat/improve
Arik Chakma 1 year ago
parent b06e82de5f
commit 06d9b3971a
  1. 20
      src/components/TeamRoadmapsList/TeamRoadmaps.tsx

@ -27,6 +27,7 @@ import {
import { RoadmapActionDropdown } from './RoadmapActionDropdown'; import { RoadmapActionDropdown } from './RoadmapActionDropdown';
import { UpdateTeamResourceModal } from '../CreateTeam/UpdateTeamResourceModal'; import { UpdateTeamResourceModal } from '../CreateTeam/UpdateTeamResourceModal';
import { ShareOptionsModal } from '../ShareOptions/ShareOptionsModal'; import { ShareOptionsModal } from '../ShareOptions/ShareOptionsModal';
import { cn } from '../../lib/classname';
export function TeamRoadmaps() { export function TeamRoadmaps() {
const { t: teamId } = getUrlParams(); const { t: teamId } = getUrlParams();
@ -428,7 +429,12 @@ export function TeamRoadmaps() {
return ( return (
<div <div
className="grid grid-cols-1 p-2.5 sm:grid-cols-[auto_110px]" className={cn(
'grid grid-cols-1 p-2.5',
canManageCurrentTeam
? 'sm:grid-cols-[auto_172px]'
: 'sm:grid-cols-[auto_110px]'
)}
key={resourceConfig.resourceId} key={resourceConfig.resourceId}
> >
<div className="mb-3 grid grid-cols-1 sm:mb-0"> <div className="mb-3 grid grid-cols-1 sm:mb-0">
@ -479,6 +485,18 @@ export function TeamRoadmaps() {
<ExternalLink className="inline-block h-4 w-4" /> <ExternalLink className="inline-block h-4 w-4" />
Visit Visit
</a> </a>
{canManageCurrentTeam && (
<a
href={`/r?id=${resourceConfig.resourceId}`}
className={
'ml-2 flex items-center gap-2 rounded-md border border-gray-800 bg-gray-900 px-2.5 py-1.5 text-xs text-white hover:bg-gray-800 focus:outline-none'
}
target={'_blank'}
>
<PenSquare className="inline-block h-4 w-4" />
Edit
</a>
)}
</div> </div>
</div> </div>
); );

Loading…
Cancel
Save