diff --git a/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlockHeader.tsx b/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlockHeader.tsx
index 897eb008e..75cb9cbe7 100644
--- a/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlockHeader.tsx
+++ b/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlockHeader.tsx
@@ -1,4 +1,3 @@
-
import { useStore } from "App/mstore";
import React from 'react';
import { connect } from 'react-redux';
diff --git a/frontend/app/components/Session/Tabs/Tabs.tsx b/frontend/app/components/Session/Tabs/Tabs.tsx
index 4e8cc87ff..bbf3d5b34 100644
--- a/frontend/app/components/Session/Tabs/Tabs.tsx
+++ b/frontend/app/components/Session/Tabs/Tabs.tsx
@@ -23,7 +23,7 @@ const Tabs = ({ tabs, active, onClick, border = true, className }: Props) => {
({
+ options={tabs.map(({ key, text, hidden = false, disabled = false, iconComp = null }) => ({
label: (
{
@@ -31,7 +31,7 @@ const Tabs = ({ tabs, active, onClick, border = true, className }: Props) => {
}}
className={'font-semibold flex gap-1 items-center'}
>
-
+ {iconComp ? iconComp : }
{text}
),
diff --git a/frontend/app/components/Spots/SpotPlayer/components/SpotPlayerHeader.tsx b/frontend/app/components/Spots/SpotPlayer/components/SpotPlayerHeader.tsx
index 47c5e49e6..ef69a9482 100644
--- a/frontend/app/components/Spots/SpotPlayer/components/SpotPlayerHeader.tsx
+++ b/frontend/app/components/Spots/SpotPlayer/components/SpotPlayerHeader.tsx
@@ -1,24 +1,37 @@
-import { ArrowLeftOutlined, CommentOutlined, CopyOutlined, DeleteOutlined, DownloadOutlined, MoreOutlined, SettingOutlined, UserSwitchOutlined } from '@ant-design/icons';
-import { Badge, Button, Dropdown, MenuProps, Popover, Tooltip, message } from 'antd';
+import {
+ ArrowLeftOutlined,
+ CommentOutlined,
+ CopyOutlined,
+ DeleteOutlined,
+ DownloadOutlined,
+ MoreOutlined,
+ SettingOutlined,
+ UserSwitchOutlined,
+} from '@ant-design/icons';
+import {
+ Badge,
+ Button,
+ Dropdown,
+ MenuProps,
+ Popover,
+ Tooltip,
+ message,
+} from 'antd';
import copy from 'copy-to-clipboard';
import { observer } from 'mobx-react-lite';
import React, { useState } from 'react';
import { connect } from 'react-redux';
import { useHistory } from 'react-router-dom';
-
-
+import Tabs from 'App/components/Session/Tabs';
import { useStore } from 'App/mstore';
import { spotsList } from 'App/routes';
import { hashString } from 'App/types/session/session';
import { Avatar, Icon } from 'UI';
-
-
import { TABS, Tab } from '../consts';
import AccessModal from './AccessModal';
-
const spotLink = spotsList();
function SpotPlayerHeader({
@@ -75,11 +88,11 @@ function SpotPlayerHeader({
const onMenuClick = async ({ key }: { key: string }) => {
if (key === '1') {
const { url } = await spotStore.getVideo(spotStore.currentSpot!.spotId);
- await downloadFile(url, `${spotStore.currentSpot!.title}.webm`)
+ await downloadFile(url, `${spotStore.currentSpot!.title}.webm`);
} else if (key === '2') {
spotStore.deleteSpot([spotStore.currentSpot!.spotId]).then(() => {
history.push(spotsList());
- message.success('Spot deleted successfully');
+ message.success('Spot deleted successfully');
});
}
};
@@ -185,26 +198,38 @@ function SpotPlayerHeader({
/>
>
) : null}
-
-
-
+ ,
+ },
+ {
+ key: TABS.COMMENTS,
+ iconComp:
,
+ text: (
+
+ Comments{' '}
+ {comments.length > 0 && (
+
+ )}
+
+ ),
+ },
+ ]}
+ active={activeTab}
+ onClick={(k) =>
+ k === activeTab ? setActiveTab(null) : setActiveTab(k)
+ }
+ />
);
}