Skip to content

Commit

Permalink
Remove redundant docviewer button component (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswilty authored Mar 28, 2024
1 parent 17ec740 commit c00b4ee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 34 deletions.
5 changes: 5 additions & 0 deletions frontend/src/components/ControlPanel/ControlPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@
.control-panel .config-container > .details-content {
margin: 0;
}

.control-panel .document-view-button {
width: 100%;
height: 2.5rem;
}
9 changes: 7 additions & 2 deletions frontend/src/components/ControlPanel/ControlPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DEFENCES_HIDDEN_LEVEL3_IDS, MODEL_DEFENCES } from '@src/Defences';
import DefenceBox from '@src/components/DefenceBox/DefenceBox';
import DocumentViewButton from '@src/components/DocumentViewer/DocumentViewButton';
import ModelBox from '@src/components/ModelBox/ModelBox';
import DetailElement from '@src/components/ThemedButtons/DetailElement';
import ThemedButton from '@src/components/ThemedButtons/ThemedButton';
import { ChatMessage, ChatModel } from '@src/models/chat';
import {
DEFENCE_ID,
Expand Down Expand Up @@ -112,7 +112,12 @@ function ControlPanel({

{/* only show document viewer button in sandbox mode */}
{currentLevel === LEVEL_NAMES.SANDBOX && (
<DocumentViewButton openDocumentViewer={openDocumentViewer} />
<ThemedButton
className="document-view-button"
onClick={openDocumentViewer}
>
View Documents
</ThemedButton>
)}
</div>
);
Expand Down
15 changes: 0 additions & 15 deletions frontend/src/components/DocumentViewer/DocumentViewButton.css

This file was deleted.

17 changes: 0 additions & 17 deletions frontend/src/components/DocumentViewer/DocumentViewButton.tsx

This file was deleted.

0 comments on commit c00b4ee

Please sign in to comment.