mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-30 04:30:01 +02:00
Roadmap action dropdown fix
This commit is contained in:
21
src/components/ReactIcons/MoreVerticalIcon.tsx
Normal file
21
src/components/ReactIcons/MoreVerticalIcon.tsx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
type MoreVerticalIconProps = {
|
||||||
|
className?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function MoreVerticalIcon(props: MoreVerticalIconProps) {
|
||||||
|
const { className } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
clipRule="evenodd"
|
||||||
|
fillRule="evenodd"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
strokeMiterlimit="2"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
className={className}
|
||||||
|
>
|
||||||
|
<path d="m12 16.495c1.242 0 2.25 1.008 2.25 2.25s-1.008 2.25-2.25 2.25-2.25-1.008-2.25-2.25 1.008-2.25 2.25-2.25zm0-6.75c1.242 0 2.25 1.008 2.25 2.25s-1.008 2.25-2.25 2.25-2.25-1.008-2.25-2.25 1.008-2.25 2.25-2.25zm0-6.75c1.242 0 2.25 1.008 2.25 2.25s-1.008 2.25-2.25 2.25-2.25-1.008-2.25-2.25 1.008-2.25 2.25-2.25z" />
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
@@ -1,5 +1,4 @@
|
|||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import ChevronDown from '../../icons/dropdown.svg';
|
|
||||||
import { httpGet } from '../../lib/http';
|
import { httpGet } from '../../lib/http';
|
||||||
import { useAuth } from '../../hooks/use-auth';
|
import { useAuth } from '../../hooks/use-auth';
|
||||||
import { useOutsideClick } from '../../hooks/use-outside-click';
|
import { useOutsideClick } from '../../hooks/use-outside-click';
|
||||||
@@ -10,6 +9,7 @@ import { useStore } from '@nanostores/react';
|
|||||||
import { useTeamId } from '../../hooks/use-team-id';
|
import { useTeamId } from '../../hooks/use-team-id';
|
||||||
import { useToast } from '../../hooks/use-toast';
|
import { useToast } from '../../hooks/use-toast';
|
||||||
import type { ValidTeamType } from '../CreateTeam/Step0';
|
import type { ValidTeamType } from '../CreateTeam/Step0';
|
||||||
|
import { DropdownIcon } from '../ReactIcons/DropdownIcon.tsx';
|
||||||
|
|
||||||
const allowedStatus = ['invited', 'joined', 'rejected'] as const;
|
const allowedStatus = ['invited', 'joined', 'rejected'] as const;
|
||||||
export type AllowedMemberStatus = (typeof allowedStatus)[number];
|
export type AllowedMemberStatus = (typeof allowedStatus)[number];
|
||||||
@@ -44,7 +44,7 @@ export function TeamDropdown() {
|
|||||||
if (shouldShowTeamIndicator) {
|
if (shouldShowTeamIndicator) {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
'viewedTeamsCount',
|
'viewedTeamsCount',
|
||||||
(viewedTeamsCountNumber + 1).toString()
|
(viewedTeamsCountNumber + 1).toString(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
@@ -67,7 +67,7 @@ export function TeamDropdown() {
|
|||||||
|
|
||||||
async function getAllTeams() {
|
async function getAllTeams() {
|
||||||
const { response, error } = await httpGet<TeamListResponse>(
|
const { response, error } = await httpGet<TeamListResponse>(
|
||||||
`${import.meta.env.PUBLIC_API_URL}/v1-get-user-teams`
|
`${import.meta.env.PUBLIC_API_URL}/v1-get-user-teams`,
|
||||||
);
|
);
|
||||||
if (error || !response) {
|
if (error || !response) {
|
||||||
toast.error(error?.message || 'Something went wrong');
|
toast.error(error?.message || 'Something went wrong');
|
||||||
@@ -140,7 +140,7 @@ export function TeamDropdown() {
|
|||||||
{isLoading && 'Loading ..'}
|
{isLoading && 'Loading ..'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<img alt={'show dropdown'} src={ChevronDown.src} className="h-4 w-4" />
|
<DropdownIcon className={'h-4 w-4'} />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{showDropdown && (
|
{showDropdown && (
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import MoreIcon from '../../icons/more-vertical.svg';
|
|
||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
import { useOutsideClick } from '../../hooks/use-outside-click';
|
import { useOutsideClick } from '../../hooks/use-outside-click';
|
||||||
import { Lock, MoreVertical, Shapes, Trash2 } from 'lucide-react';
|
import { Lock, MoreVertical, Shapes, Trash2 } from 'lucide-react';
|
||||||
|
import { MoreVerticalIcon } from '../ReactIcons/MoreVerticalIcon.tsx';
|
||||||
|
|
||||||
type RoadmapActionDropdownProps = {
|
type RoadmapActionDropdownProps = {
|
||||||
onDelete?: () => void;
|
onDelete?: () => void;
|
||||||
@@ -26,7 +26,7 @@ export function RoadmapActionDropdown(props: RoadmapActionDropdownProps) {
|
|||||||
onClick={() => setIsOpen(!isOpen)}
|
onClick={() => setIsOpen(!isOpen)}
|
||||||
className="hidden items-center opacity-60 transition-opacity hover:opacity-100 disabled:cursor-not-allowed disabled:opacity-30 sm:flex"
|
className="hidden items-center opacity-60 transition-opacity hover:opacity-100 disabled:cursor-not-allowed disabled:opacity-30 sm:flex"
|
||||||
>
|
>
|
||||||
<img alt="menu" src={MoreIcon.src} className="h-4 w-4" />
|
<MoreVerticalIcon className={'h-4 w-4'} />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
disabled={false}
|
disabled={false}
|
||||||
|
Reference in New Issue
Block a user