Skip to content

Commit

Permalink
chore: use theme
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulyadav-57 committed Dec 25, 2024
1 parent f137527 commit 539c4cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/workspace/Editor/CodeDiffViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useTheme } from '@/components/shared/ThemeProvider';
import { useFile, useFileTab } from '@/hooks';
import { useLogActivity } from '@/hooks/logActivity.hooks';
import { useProject } from '@/hooks/projectV2.hooks';
Expand Down Expand Up @@ -25,6 +26,7 @@ const CodeDiffViewer: FC = () => {
const { fileTab } = useFileTab();
const { getFile, saveFile } = useFile();
const logger = useLogActivity();
const { theme } = useTheme();

const diffEditorRef = useRef<monaco.editor.IStandaloneDiffEditor | null>(
null,
Expand Down Expand Up @@ -115,7 +117,7 @@ const CodeDiffViewer: FC = () => {
return (
<div className={s.diffEditor}>
<DiffEditor
theme="vs-theme-dark"
theme={theme === 'dark' ? 'vs-theme-dark' : 'light'}
height="100vh"
language={fileTypeFromFileName(fileTab.active?.path ?? '')}
original={diff.oldContent}
Expand Down

0 comments on commit 539c4cf

Please sign in to comment.