mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-03-15 12:49:43 +01:00
Add skip button for teams
This commit is contained in:
parent
5cf286a753
commit
5d3202e065
@ -41,17 +41,30 @@ export function Step2(props: Step2Props) {
|
|||||||
<span className="mr-1">←</span>
|
<span className="mr-1">←</span>
|
||||||
Previous Step
|
Previous Step
|
||||||
</button>
|
</button>
|
||||||
<button
|
<div className={'flex gap-2'}>
|
||||||
type="submit"
|
{teamResourceConfig.length === 0 && (
|
||||||
disabled={teamResourceConfig.length === 0}
|
<button
|
||||||
onClick={onNext}
|
type="button"
|
||||||
className={
|
onClick={onNext}
|
||||||
'rounded-md border bg-black px-4 py-2 text-white disabled:opacity-50'
|
className={
|
||||||
}
|
'rounded-md border border-gray-300 bg-white px-4 py-2 text-gray-500 hover:border-gray-400 hover:text-black'
|
||||||
>
|
}
|
||||||
Next Step
|
>
|
||||||
<span className="ml-1">→</span>
|
Skip for Now
|
||||||
</button>
|
</button>
|
||||||
|
)}
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
disabled={teamResourceConfig.length === 0}
|
||||||
|
onClick={onNext}
|
||||||
|
className={
|
||||||
|
'rounded-md border bg-black px-4 py-2 text-white disabled:opacity-50'
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Next Step
|
||||||
|
<span className="ml-1">→</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -155,12 +155,6 @@ export function TeamDropdown() {
|
|||||||
Invite
|
Invite
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{team.roadmaps.length === 0 && (
|
|
||||||
<span className="flex rounded-md bg-gray-500 px-2 text-xs text-white">
|
|
||||||
Draft
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
@ -8,13 +8,14 @@ import MapIcon from '../icons/map.svg';
|
|||||||
import GroupIcon from '../icons/group.svg';
|
import GroupIcon from '../icons/group.svg';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { useStore } from '@nanostores/preact';
|
import { useStore } from '@nanostores/preact';
|
||||||
import { $canManageCurrentTeam } from '../stores/team';
|
import { $canManageCurrentTeam, $currentTeam } from '../stores/team';
|
||||||
|
import { WarningIcon } from './ReactIcons/WarningIcon';
|
||||||
|
|
||||||
export const TeamSidebar: FunctionalComponent<{
|
export const TeamSidebar: FunctionalComponent<{
|
||||||
activePageId: string;
|
activePageId: string;
|
||||||
}> = ({ activePageId, children }) => {
|
}> = ({ activePageId, children }) => {
|
||||||
const [menuShown, setMenuShown] = useState(false);
|
const [menuShown, setMenuShown] = useState(false);
|
||||||
const canManageCurrentTeam = useStore($canManageCurrentTeam);
|
const currentTeam = useStore($currentTeam);
|
||||||
|
|
||||||
const { teamId } = useTeamId();
|
const { teamId } = useTeamId();
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ export const TeamSidebar: FunctionalComponent<{
|
|||||||
href: `/team/roadmaps?t=${teamId}`,
|
href: `/team/roadmaps?t=${teamId}`,
|
||||||
id: 'roadmaps',
|
id: 'roadmaps',
|
||||||
icon: MapIcon,
|
icon: MapIcon,
|
||||||
|
hasWarning: currentTeam?.roadmaps?.length === 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Members',
|
title: 'Members',
|
||||||
@ -120,13 +122,21 @@ export const TeamSidebar: FunctionalComponent<{
|
|||||||
: 'border-r-transparent text-gray-500 hover:border-r-gray-300'
|
: 'border-r-transparent text-gray-500 hover:border-r-gray-300'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<span class="flex flex-grow items-center">
|
<span class="flex flex-grow items-center justify-between">
|
||||||
<img
|
<span className="flex">
|
||||||
alt="menu icon"
|
<img
|
||||||
src={sidebarLink.icon}
|
alt="menu icon"
|
||||||
className="mr-2 h-4 w-4"
|
src={sidebarLink.icon}
|
||||||
/>
|
className="mr-2 h-4 w-4"
|
||||||
{sidebarLink.title}
|
/>
|
||||||
|
{sidebarLink.title}
|
||||||
|
</span>
|
||||||
|
{sidebarLink.hasWarning && (
|
||||||
|
<span class="relative mr-1 flex items-center">
|
||||||
|
<span class="relative rounded-full bg-red-200 p-1 text-xs" />
|
||||||
|
<span class="absolute bottom-0 left-0 right-0 top-0 animate-ping rounded-full bg-red-400 p-1 text-xs" />
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user