From 35148cb8a3ed6fe5bfa3efdaff6e6935c60356dd Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 28 Jul 2023 18:46:36 +0100 Subject: [PATCH] Responsiveness --- src/components/AccountSidebar.astro | 22 +-- src/components/CreateTeam/CreateTeamForm.tsx | 10 +- src/components/CreateTeam/RoadmapSelector.tsx | 2 +- src/components/CreateTeam/Step0.tsx | 6 +- src/components/CreateTeam/Step1.tsx | 2 +- src/components/CreateTeam/Step2.tsx | 38 ++-- src/components/CreateTeam/Step3.tsx | 8 +- .../Navigation/AccountDropdown.astro | 8 + src/components/TeamDropdown/TeamDropdown.tsx | 170 +++++++++--------- src/components/TeamSidebar.tsx | 2 +- 10 files changed, 148 insertions(+), 120 deletions(-) diff --git a/src/components/AccountSidebar.astro b/src/components/AccountSidebar.astro index 1fac87fcc..93553f3ec 100644 --- a/src/components/AccountSidebar.astro +++ b/src/components/AccountSidebar.astro @@ -66,17 +66,17 @@ const sidebarLinks = [ id='settings-menu-dropdown' class='absolute left-0 right-0 z-10 mt-1 hidden space-y-1.5 bg-white p-2 shadow-lg' > - - - - - - - - - - - +
  • + + + Teams + +
  • { sidebarLinks.map((sidebarLink) => { const isActive = activePageId === sidebarLink.id; diff --git a/src/components/CreateTeam/CreateTeamForm.tsx b/src/components/CreateTeam/CreateTeamForm.tsx index 88a4f87d3..a00b1e152 100644 --- a/src/components/CreateTeam/CreateTeamForm.tsx +++ b/src/components/CreateTeam/CreateTeamForm.tsx @@ -190,14 +190,14 @@ export function CreateTeamForm() { } return ( -
    -
    -

    Create Team

    -

    +

    +
    +

    Create Team

    +

    Complete the steps below to create your team

    -
    +
    0 && ( -
    +
    {teamResourceConfig.map(({ resourceId, removed: removedTopics }) => { const roadmapTitle = allRoadmaps.find((roadmap) => roadmap.id === resourceId)?.title || diff --git a/src/components/CreateTeam/Step0.tsx b/src/components/CreateTeam/Step0.tsx index 16ad19114..c583de641 100644 --- a/src/components/CreateTeam/Step0.tsx +++ b/src/components/CreateTeam/Step0.tsx @@ -70,7 +70,7 @@ export function Step0(props: Step0Props) { return ( <> -
    +
    {validTeamTypes.map((validTeamType) => (
    } -
    + )} -
    +
    - + +
    + + +
    ); diff --git a/src/components/CreateTeam/Step3.tsx b/src/components/CreateTeam/Step3.tsx index 320b0ba4f..39e1e6b5b 100644 --- a/src/components/CreateTeam/Step3.tsx +++ b/src/components/CreateTeam/Step3.tsx @@ -76,7 +76,7 @@ export function Step3(props: Step3Props) { return (
    -

    Invite your Team

    +

    Invite your Team

    Use the form below to invite your team members to your team. You can also invite them later. @@ -85,7 +85,7 @@ export function Step3(props: Step3Props) {

    {users.map((user, userCounter) => { return ( -
    +
    )} -
    +
    - - {showDropdown && ( -
    +
    + - return ( -
  • - - {team.name} - {pendingTeamIds.includes(team._id) && ( - - Invite - - )} - -
  • - ); - })} - - - + - New Team - -
    - )} +
      +
    • + + Personal Account + +
    • + {teamList.map((team) => { + let pageLink = ''; + if (team.status === 'invited') { + pageLink = `/respond-invite?i=${team.memberId}`; + } else if (team.status === 'joined') { + pageLink = `/team/progress?t=${team._id}`; + } -
      -
    + return ( +
  • + + + {team.name} + + {pendingTeamIds.includes(team._id) && ( + + Invite + + )} + +
  • + ); + })} + + + + + New Team + +
    + )} +
    +
    + ); } diff --git a/src/components/TeamSidebar.tsx b/src/components/TeamSidebar.tsx index 7c26a4238..a678858ca 100644 --- a/src/components/TeamSidebar.tsx +++ b/src/components/TeamSidebar.tsx @@ -76,7 +76,7 @@ export const TeamSidebar: FunctionalComponent<{ }`} > {'teams'} - Teams + Personal Account / Teams {sidebarLinks.map((sidebarLink) => {