From 63a43a1ca99b57a5dec0abf685de66cba89cf501 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 30 Aug 2024 10:20:25 +0200 Subject: [PATCH] ui: remove debug buttons --- .../Spots/SpotsList/SpotsListHeader.tsx | 17 ----------------- .../app/components/Spots/SpotsList/index.tsx | 12 +++++------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/frontend/app/components/Spots/SpotsList/SpotsListHeader.tsx b/frontend/app/components/Spots/SpotsList/SpotsListHeader.tsx index 11367cd88..061a6b79a 100644 --- a/frontend/app/components/Spots/SpotsList/SpotsListHeader.tsx +++ b/frontend/app/components/Spots/SpotsList/SpotsListHeader.tsx @@ -1,34 +1,21 @@ import { Button, Input, Segmented } from 'antd'; import { observer } from 'mobx-react-lite'; import React from 'react'; -import { connect } from 'react-redux'; - -import { downgradeScope } from 'App/duck/user'; import { useStore } from 'App/mstore'; import { debounce } from 'App/utils'; import { Icon } from 'UI'; -const DebugDowngrade = connect(null, { downgradeScope })( - ({ downgradeScope }: any) => ( - - ) -); - const SpotsListHeader = observer( ({ onDelete, selectedCount, onClearSelection, isEmpty, - toggleEmptyState, - isEmptyState, }: { onDelete: () => void; selectedCount: number; onClearSelection: () => void; isEmpty?: boolean; - toggleEmptyState?: () => void; - isEmptyState?: boolean; }) => { const { spotStore } = useStore(); @@ -61,10 +48,6 @@ const SpotsListHeader = observer(

Spot List

- -
{isEmpty ? null : ( diff --git a/frontend/app/components/Spots/SpotsList/index.tsx b/frontend/app/components/Spots/SpotsList/index.tsx index de389c761..35380c805 100644 --- a/frontend/app/components/Spots/SpotsList/index.tsx +++ b/frontend/app/components/Spots/SpotsList/index.tsx @@ -1,8 +1,8 @@ +import withPageTitle from 'HOCs/withPageTitle'; import { message } from 'antd'; import { observer } from 'mobx-react-lite'; import React from 'react'; -import withPageTitle from 'HOCs/withPageTitle'; import withPermissions from 'App/components/hocs/withPermissions'; import { useStore } from 'App/mstore'; import { numberWithCommas } from 'App/utils'; @@ -16,7 +16,6 @@ import SpotsListHeader from './SpotsListHeader'; function SpotsList() { const [selectedSpots, setSelectedSpots] = React.useState([]); - const [isEmptyState, setIsEmpty] = React.useState(false); const { spotStore } = useStore(); React.useEffect(() => { @@ -74,7 +73,7 @@ function SpotsList() { }; const isLoading = spotStore.isLoading; - const isEmpty = isEmptyState || spotStore.total === 0 && spotStore.query === '' + const isEmpty = spotStore.total === 0 && spotStore.query === ''; return (
setIsEmpty(!isEmptyState)} />
@@ -163,5 +160,6 @@ function SpotsList() { ); } -export default withPermissions(['SPOT'])(withPageTitle('Spot List - OpenReplay')(observer(SpotsList))); - +export default withPermissions(['SPOT'])( + withPageTitle('Spot List - OpenReplay')(observer(SpotsList)) +);