diff --git a/components/TeamListItem.tsx b/components/TeamListItem.tsx deleted file mode 100644 index c5cb1814..00000000 --- a/components/TeamListItem.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { ChevronDownIcon, ChevronUpIcon, UserAddIcon, TrashIcon, UsersIcon } from "@heroicons/react/outline"; - -export default function TeamListItem(props) { - return (
Alex van Andel ({ member.email }) | -Owner | -- - | -
Alex van Andel ({ member.email }) | +Owner | ++ + | +
+
|
+
Loading...
; } - const teams = [ - { name: "Flying Colours Life", userRole: "Owner", members: [ - { "name": "Alex van Andel", "email": "bartfalij@gmail.com", "role": "Owner" }, - { "email": "me@alexvanandel.com", "role": "Member" }, - { "email": "avanandel@flyingcolourslife.com", "role": "Member" }, - ] }, - { name: "Partner Wealth", userRole: "Member" } - ]; - - const invitations = [ - { name: "Asset Management", userRole: "Invitee" } - ]; + const createTeam = (e) => { + e.preventDefault(); + return fetch('/api/teams', { + method: 'POST', + body: JSON.stringify({ name: e.target.elements['name'].value }), + headers: { + 'Content-Type': 'application/json' + } + }).then( () => { + loadTeams(); + setShowCreateTeamModal(false); + }); + } return(+
View, edit and create teams to organise relationships between users
- {teams.length === 0 &&Team up with other users
by adding a new team
- You cannot convert this account into a team until you leave all teams that you’re a member of. -
- -+ {membership.length !== 0 && "You cannot convert this account into a team until you leave all teams that you’re a member of."} + {membership.length === 0 && "A user account can be turned into a team, as a team ...."} +
+