diff --git a/src/side-panel/CustomTabPanel.tsx b/src/side-panel/CustomTabPanel.tsx deleted file mode 100644 index fbf77f5..0000000 --- a/src/side-panel/CustomTabPanel.tsx +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @copyright Internet Initiative Japan Inc. All rights reserved. - * @license BSD-3-Clause - */ - -// react -import type { ReactNode } from "react"; -import { Box } from "@mui/material"; - -interface CustomTabPanelProps { - children?: ReactNode; - index: number; - value: number; -} - -const CustomTabPanel = ({ children, value, index, ...other }: CustomTabPanelProps) => { - return ( - - ); -}; - -export { CustomTabPanel }; diff --git a/src/side-panel/SidePanel.tsx b/src/side-panel/SidePanel.tsx index 0baa92a..b9cc585 100644 --- a/src/side-panel/SidePanel.tsx +++ b/src/side-panel/SidePanel.tsx @@ -4,7 +4,7 @@ */ // react -import { type SyntheticEvent, useEffect, useRef, useState } from "react"; +import { Activity, type SyntheticEvent, useEffect, useRef, useState } from "react"; import { AppBar, Box, @@ -20,12 +20,16 @@ import { lightGreen } from "@mui/material/colors"; import { RecordPanel } from "@/side-panel/record-panel/RecordPanel.tsx"; import { SessionPanel } from "@/side-panel/session-panel/SessionPanel.tsx"; import { SidePanelState } from "@/side-panel/config.ts"; -// tab-panel -import { a11yProps } from "@/side-panel/utils.ts"; -import { CustomTabPanel } from "@/side-panel/CustomTabPanel.tsx"; // local import type { SessionSummary } from "@/common/models/session-summary.ts"; +const a11yProps = (index: number) => { + return { + id: `simple-tab-${index}`, + "aria-controls": `simple-tabpanel-${index}`, + }; +}; + const SidePanel = ({ tabId, testId }: { tabId: number; testId?: string }) => { const [panelState, setPanelState] = useState(SidePanelState.STOPPED); const [sessionSummaries, setSessionSummaries] = useState([]); @@ -93,7 +97,7 @@ const SidePanel = ({ tabId, testId }: { tabId: number; testId?: string }) => { }} /> - + { headerHeight={headerHeight} testId={testId} /> - - + + { headerHeight={headerHeight} testId={testId} /> - + diff --git a/src/side-panel/record-panel/RecordPanel.tsx b/src/side-panel/record-panel/RecordPanel.tsx index 82b5a46..c6bd9de 100644 --- a/src/side-panel/record-panel/RecordPanel.tsx +++ b/src/side-panel/record-panel/RecordPanel.tsx @@ -6,6 +6,7 @@ // react import React, { useEffect, useRef, useState } from "react"; import { Box } from "@mui/material"; +import { grey } from "@mui/material/colors"; // side-panel import { SessionCardList } from "@/side-panel/session-card/SessionCardList.tsx"; import { RecordButton } from "@/side-panel/record-panel/RecordButton.tsx"; @@ -121,16 +122,35 @@ const RecordPanel = ({ /> - + > + + ); }; diff --git a/src/side-panel/session-panel/SessionPanel.tsx b/src/side-panel/session-panel/SessionPanel.tsx index a49b9c8..2a110de 100644 --- a/src/side-panel/session-panel/SessionPanel.tsx +++ b/src/side-panel/session-panel/SessionPanel.tsx @@ -6,6 +6,7 @@ // react import React, { useEffect, useRef, useState } from "react"; import { Box } from "@mui/material"; +import { grey } from "@mui/material/colors"; // side-panel import { SessionCardList } from "@/side-panel/session-card/SessionCardList.tsx"; import { LoadButton } from "@/side-panel/session-panel/LoadButton.tsx"; @@ -81,16 +82,35 @@ const SessionPanel = ({ /> - + > + + ); }; diff --git a/src/side-panel/utils.ts b/src/side-panel/utils.ts index 7dbfba4..b0202f0 100644 --- a/src/side-panel/utils.ts +++ b/src/side-panel/utils.ts @@ -6,13 +6,6 @@ // react import { type EffectCallback, useEffect } from "react"; -const a11yProps = (index: number) => { - return { - id: `simple-tab-${index}`, - "aria-controls": `simple-tabpanel-${index}`, - }; -}; - const formatRFC3339Date = (d: Date) => { if (isNaN(d.valueOf())) return ""; @@ -53,4 +46,4 @@ const useEffectOnce = (effect: EffectCallback) => { useEffect(effect, []); // eslint-disable-line react-hooks/exhaustive-deps }; -export { a11yProps, formatRFC3339, timestamp, useEffectOnce }; +export { formatRFC3339, timestamp, useEffectOnce };