From dac1842d367abc90761ba046c91687947f2597c0 Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Wed, 30 Mar 2022 14:51:06 +0200 Subject: [PATCH] fix typing issues --- .../components/interfaces/Settings/Logs/LogSelection.tsx | 1 + studio/components/interfaces/Settings/Logs/LogTable.tsx | 2 ++ studio/components/interfaces/Settings/Logs/Logs.types.ts | 1 - .../components/interfaces/Settings/Logs/LogsPreviewer.tsx | 8 +++++++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/studio/components/interfaces/Settings/Logs/LogSelection.tsx b/studio/components/interfaces/Settings/Logs/LogSelection.tsx index 576113e9012..536a970e38c 100644 --- a/studio/components/interfaces/Settings/Logs/LogSelection.tsx +++ b/studio/components/interfaces/Settings/Logs/LogSelection.tsx @@ -11,6 +11,7 @@ import FunctionInvocationSelectionRender, { FunctionInvocationHeaderRender, } from './LogSelectionRenderers/FunctionInvocationSelectionRender' import FunctionLogsSelectionRender from './LogSelectionRenderers/FunctionLogsSelectionRender' +import DefaultSelectionRenderer from './LogSelectionRenderers/DefaultSelectionRenderer' interface Props { log: LogData | null diff --git a/studio/components/interfaces/Settings/Logs/LogTable.tsx b/studio/components/interfaces/Settings/Logs/LogTable.tsx index 189a36669e0..8efec5b29eb 100644 --- a/studio/components/interfaces/Settings/Logs/LogTable.tsx +++ b/studio/components/interfaces/Settings/Logs/LogTable.tsx @@ -28,6 +28,7 @@ interface Props { isHistogramShowing?: boolean isLoading?: boolean error?: any + showDownload?: boolean } type LogMap = { [id: string]: LogData } @@ -42,6 +43,7 @@ const LogTable = ({ onHistogramToggle, isHistogramShowing, isLoading, + showDownload, error, }: Props) => { const [focusedLog, setFocusedLog] = useState(null) diff --git a/studio/components/interfaces/Settings/Logs/Logs.types.ts b/studio/components/interfaces/Settings/Logs/Logs.types.ts index 759fb1b1276..7112ce59153 100644 --- a/studio/components/interfaces/Settings/Logs/Logs.types.ts +++ b/studio/components/interfaces/Settings/Logs/Logs.types.ts @@ -3,7 +3,6 @@ interface Metadata { } export type LogSearchCallback = (filters: { query: string; to?: string; from?: string; fromMicro?: number, toMicro?: number }) => void -export type LogSearchCallback = (filters: { query: string; to?: string; toMicro?: number }) => void export interface LogsEndpointParams { // project ref project: string diff --git a/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx b/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx index e498d97828f..be27c3ddad3 100644 --- a/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx +++ b/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx @@ -45,8 +45,14 @@ interface Props { projectRef: string queryType: QueryType override: Override + condensedLayout?: boolean } -export const LogsPreviewer: React.FC = ({ projectRef, queryType, override }) => { +export const LogsPreviewer: React.FC = ({ + projectRef, + queryType, + override, + condensedLayout = false, +}) => { const router = useRouter() const { s, te, ts } = router.query const [showChart, setShowChart] = useState(true)