From 5edda5654c41a306bfece2a9c83abf4cdaf1bff5 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Thu, 9 Nov 2023 21:07:19 +0000 Subject: [PATCH 1/3] Team icons fix --- src/components/CreateTeam/Step0.tsx | 27 ++++++++++---------- src/components/ReactIcons/BuildingIcon.tsx | 29 ++++++++++++++++++++++ src/components/ReactIcons/UsersIcon.tsx | 26 +++++++++++++++++++ 3 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 src/components/ReactIcons/BuildingIcon.tsx create mode 100644 src/components/ReactIcons/UsersIcon.tsx diff --git a/src/components/CreateTeam/Step0.tsx b/src/components/CreateTeam/Step0.tsx index 3a72fd564..f09102752 100644 --- a/src/components/CreateTeam/Step0.tsx +++ b/src/components/CreateTeam/Step0.tsx @@ -1,22 +1,22 @@ -import BuildingIcon from '../../icons/building.svg'; -import UsersIcon from '../../icons/users.svg'; import type { TeamDocument } from './CreateTeamForm'; import { httpPut } from '../../lib/http'; import { useState } from 'react'; import { NextButton } from './NextButton'; +import { BuildingIcon } from '../ReactIcons/BuildingIcon.tsx'; +import { UsersIcon } from '../ReactIcons/UsersIcon.tsx'; export const validTeamTypes = [ { value: 'company', label: 'Company', - icon: BuildingIcon.src, + icon: BuildingIcon, description: 'Track the skills and learning progress of the tech team at your company', }, { value: 'study_group', label: 'Study Group', - icon: UsersIcon.src, + icon: UsersIcon, description: 'Invite your friends or course-mates and track your learning progress together', }, @@ -56,7 +56,7 @@ export function Step0(props: Step0Props) { teamSize: team.teamSize, linkedInUrl: team?.links?.linkedIn || undefined, }), - } + }, ); if (error || !response) { @@ -76,21 +76,20 @@ export function Step0(props: Step0Props) { {validTeamTypes.map((validTeamType) => ( {roleBasedRoadmaps.map((roadmap) => { const isSelected = !!teamResourceConfig?.find( - (r) => r.resourceId === roadmap.id + (r) => r.resourceId === roadmap.id, ); return ( @@ -127,7 +127,7 @@ export function SelectRoadmapModal(props: SelectRoadmapModalProps) {
{skillBasedRoadmaps.map((roadmap) => { const isSelected = !!teamResourceConfig.find( - (r) => r.resourceId === roadmap.id + (r) => r.resourceId === roadmap.id, ); return ( From 3774f3c5ec6c515d2948dc6d334c0782912e7147 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Thu, 9 Nov 2023 21:15:08 +0000 Subject: [PATCH 3/3] Team sidebar fix --- src/components/ReactIcons/CogIcon.tsx | 28 +++++++++++ .../ReactIcons/TeamProgressIcon.tsx | 24 ++++++++++ src/components/TeamSidebar.tsx | 46 ++++++++----------- 3 files changed, 70 insertions(+), 28 deletions(-) create mode 100644 src/components/ReactIcons/CogIcon.tsx create mode 100644 src/components/ReactIcons/TeamProgressIcon.tsx diff --git a/src/components/ReactIcons/CogIcon.tsx b/src/components/ReactIcons/CogIcon.tsx new file mode 100644 index 000000000..24831d07e --- /dev/null +++ b/src/components/ReactIcons/CogIcon.tsx @@ -0,0 +1,28 @@ +type CogIconProps = { + className?: string; +}; +export function CogIcon(props: CogIconProps) { + const { className } = props; + + return ( + + + + + ); +} diff --git a/src/components/ReactIcons/TeamProgressIcon.tsx b/src/components/ReactIcons/TeamProgressIcon.tsx new file mode 100644 index 000000000..c18693699 --- /dev/null +++ b/src/components/ReactIcons/TeamProgressIcon.tsx @@ -0,0 +1,24 @@ +type TeamProgressIconProps = { + className?: string; +}; +export function TeamProgressIcon(props: TeamProgressIconProps) { + const { className } = props; + + return ( + + + + + ); +} diff --git a/src/components/TeamSidebar.tsx b/src/components/TeamSidebar.tsx index f9ed22b2a..ca07e71e7 100644 --- a/src/components/TeamSidebar.tsx +++ b/src/components/TeamSidebar.tsx @@ -1,16 +1,16 @@ import { TeamDropdown } from './TeamDropdown/TeamDropdown'; -import ChevronDown from '../icons/dropdown.svg'; import { useTeamId } from '../hooks/use-team-id'; -import TeamProgress from '../icons/team-progress.svg'; -import SettingsIcon from '../icons/cog.svg'; import ChatIcon from '../icons/chat.svg'; -import MapIcon from '../icons/map.svg'; -import GroupIcon from '../icons/group.svg'; -import { useState } from 'react'; import type { ReactNode } from 'react'; +import { useState } from 'react'; import { useStore } from '@nanostores/react'; import { $currentTeam } from '../stores/team'; import { SubmitFeedbackPopup } from './Feedback/SubmitFeedbackPopup'; +import { ChevronDownIcon } from './ReactIcons/ChevronDownIcon.tsx'; +import { GroupIcon } from './ReactIcons/GroupIcon.tsx'; +import { TeamProgressIcon } from './ReactIcons/TeamProgressIcon.tsx'; +import { MapIcon, MessageCircle } from 'lucide-react'; +import { CogIcon } from './ReactIcons/CogIcon.tsx'; type TeamSidebarProps = { activePageId: string; @@ -29,26 +29,26 @@ export function TeamSidebar({ activePageId, children }: TeamSidebarProps) { title: 'Progress', href: `/team/progress?t=${teamId}`, id: 'progress', - icon: TeamProgress.src, + icon: TeamProgressIcon, }, { title: 'Roadmaps', href: `/team/roadmaps?t=${teamId}`, id: 'roadmaps', - icon: MapIcon.src, + icon: MapIcon, hasWarning: currentTeam?.roadmaps?.length === 0, }, { title: 'Members', href: `/team/members?t=${teamId}`, id: 'members', - icon: GroupIcon.src, + icon: GroupIcon, }, { title: 'Settings', href: `/team/settings?t=${teamId}`, id: 'settings', - icon: SettingsIcon.src, + icon: CogIcon, }, ]; @@ -66,7 +66,7 @@ export function TeamSidebar({ activePageId, children }: TeamSidebarProps) { sidebarLinks.find((sidebarLink) => sidebarLink.id === activePageId) ?.title } - menu + {menuShown && (
    - {'teams'} + Personal Account / Teams @@ -95,11 +95,8 @@ export function TeamSidebar({ activePageId, children }: TeamSidebarProps) { isActive ? 'bg-slate-100' : '' }`} > - {'menu + {} + {sidebarLink.title} @@ -111,11 +108,7 @@ export function TeamSidebar({ activePageId, children }: TeamSidebarProps) { className={`flex w-full items-center rounded px-3 py-1.5 text-sm text-slate-900 hover:bg-slate-200`} onClick={() => setShowFeedbackPopup(true)} > - {'menu + Send Feedback @@ -150,11 +143,8 @@ export function TeamSidebar({ activePageId, children }: TeamSidebarProps) { > - menu icon + {} + {sidebarLink.title} {sidebarLink.hasWarning && ( @@ -174,7 +164,7 @@ export function TeamSidebar({ activePageId, children }: TeamSidebarProps) { className="mr-3 mt-4 flex items-center justify-center rounded-md border p-2 text-sm text-gray-500 transition-colors hover:border-gray-300 hover:bg-gray-50 hover:text-black" onClick={() => setShowFeedbackPopup(true)} > - {'feedback'} + Send Feedback