+ <>
+
+ Open Activities
+
+
{isLoading &&
}
{error && (
Loading meetings failed, try refreshing the page
@@ -68,10 +81,12 @@ const ActiveMeetings = () => {
{linkedTeams?.length === 0 && (
There are no teams linked to this channel
)}
- {linkedTeams?.map((team) =>
- team.activeMeetings.map((meeting) =>
)
- )}
-
+
+ {linkedTeams?.map((team) =>
+ team.activeMeetings.map((meeting) => )
+ )}
+
+ >
)
}
diff --git a/packages/mattermost-plugin/components/Sidepanel/LinkedTeams.tsx b/packages/mattermost-plugin/components/Sidepanel/LinkedTeams.tsx
index 72fea860caa..79a78873c2e 100644
--- a/packages/mattermost-plugin/components/Sidepanel/LinkedTeams.tsx
+++ b/packages/mattermost-plugin/components/Sidepanel/LinkedTeams.tsx
@@ -1,13 +1,16 @@
import graphql from 'babel-plugin-relay/macro'
import {useMemo} from 'react'
+import {useDispatch} from 'react-redux'
import {useLazyLoadQuery} from 'react-relay'
import {LinkedTeamsQuery} from '../../__generated__/LinkedTeamsQuery.graphql'
import {useCurrentChannel} from '../../hooks/useCurrentChannel'
+import {openLinkTeamModal} from '../../reducers'
import LoadingSpinner from '../LoadingSpinner'
import TeamRow from './TeamRow'
const LinkedTeams = () => {
const channel = useCurrentChannel()
+ const dispatch = useDispatch()
const data = useLazyLoadQuery(
graphql`
query LinkedTeamsQuery {
@@ -41,18 +44,30 @@ const LinkedTeams = () => {
)
}, [data, channel])
+ const handleLink = () => {
+ dispatch(openLinkTeamModal())
+ }
+
const isLoading = false
const error = false
return (
-
+ <>
+
+ Linked Teams
+
+
{isLoading &&
}
{error &&
Loading teams failed, try refreshing the page
}
{linkedTeams?.length === 0 && (
There are no teams linked to this channel
)}
- {linkedTeams?.map((team) =>
)}
-
+
+ {linkedTeams?.map((team) => )}
+
+ >
)
}
diff --git a/packages/mattermost-plugin/components/Sidepanel/SidePanel.tsx b/packages/mattermost-plugin/components/Sidepanel/SidePanel.tsx
index 9034dd2b255..8af8d636bc2 100644
--- a/packages/mattermost-plugin/components/Sidepanel/SidePanel.tsx
+++ b/packages/mattermost-plugin/components/Sidepanel/SidePanel.tsx
@@ -1,8 +1,9 @@
+import {Forum, Group} from '@mui/icons-material'
import graphql from 'babel-plugin-relay/macro'
-import {useEffect, useMemo, useState} from 'react'
-import {useDispatch} from 'react-redux'
+import Tab from 'parabol-client/components/Tab/Tab'
+import {Suspense, useEffect, useMemo, useState} from 'react'
import {useLazyLoadQuery} from 'react-relay'
-import ReactSelect from 'react-select'
+import Tabs from '~/components/Tabs/Tabs'
import {SidePanelQuery} from '../../__generated__/SidePanelQuery.graphql'
import {useCurrentChannel} from '../../hooks/useCurrentChannel'
import {openLinkTeamModal, openStartActivityModal} from '../../reducers'
@@ -11,13 +12,15 @@ import LinkedTeams from './LinkedTeams'
const panels = {
teams: {
- label: 'Linked Parabol Teams',
+ label: 'Teams',
+ icon: ,
panel: LinkedTeams,
action: openLinkTeamModal,
actionLabel: 'Link Team'
},
meetings: {
- label: 'Active Meetings',
+ label: 'Activies',
+ icon: ,
panel: ActiveMeetings,
action: openStartActivityModal,
actionLabel: 'Start Activity'
@@ -62,37 +65,27 @@ const SidePanel = () => {
}
}, [linkedTeams])
- const dispatch = useDispatch()
-
- const handleClick = () => {
- dispatch(panels[activePanel]?.action())
- }
-
return (
-
-
-
({value, label})) as any}
- onChange={(newValue) => {
- newValue && setActivePanel(newValue.value)
- }}
- components={{
- Control: ({children, innerRef, innerProps}) => (
-
- {children}
+
+
+ {Object.entries(panels).map(([key, {icon, label}]) => (
+
+ {icon}
+ {label}
- ),
- IndicatorSeparator: () => null
- }}
- />
-
-
- {panels[activePanel]?.panel()}
+ }
+ className='p-2'
+ onClick={() => setActivePanel(key as any)}
+ />
+ ))}
+
+ {panels[activePanel]?.panel()}
)
}
diff --git a/packages/mattermost-plugin/components/Sidepanel/index.tsx b/packages/mattermost-plugin/components/Sidepanel/index.tsx
index 614151dece2..78b2b171558 100644
--- a/packages/mattermost-plugin/components/Sidepanel/index.tsx
+++ b/packages/mattermost-plugin/components/Sidepanel/index.tsx
@@ -9,7 +9,7 @@ const SidePanelRoot = () => {
const pluginServerRoute = useSelector(getPluginServerRoute)
return (
-