Skip to content

Commit

Permalink
final cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joseplayero committed Sep 1, 2024
1 parent 833604a commit 26ab604
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions src/components/Editor/EditorManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import EditorContextMenu from './EditorContextMenu'
import SearchBar from './Search/SearchBar'
import { useFileContext } from '@/contexts/FileContext'

interface EditorManagerProps {
// flattenedFiles: { relativePath: string }[]
showSimilarFiles: boolean
}

const EditorManager: React.FC<EditorManagerProps> = ({ showSimilarFiles }) => {
const EditorManager: React.FC = () => {
const [showSearchBar, setShowSearchBar] = useState(false)
const [menuVisible, setMenuVisible] = useState(false)
const [menuPosition, setMenuPosition] = useState({ x: 0, y: 0 })
Expand All @@ -20,8 +15,6 @@ const EditorManager: React.FC<EditorManagerProps> = ({ showSimilarFiles }) => {

const { editor, suggestionsState, flattenedFiles } = useFileContext()

useEffect(() => {}, [showSimilarFiles])

const handleContextMenu = (event: React.MouseEvent<HTMLDivElement>) => {
event.preventDefault()
setMenuPosition({
Expand Down
2 changes: 1 addition & 1 deletion src/components/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const MainPageContent: React.FC = () => {
{!showChatbot && currentlyOpenFilePath ? (
<div className="relative flex size-full overflow-hidden">
<div className="h-full grow overflow-hidden">
<EditorManager showSimilarFiles={showSimilarFiles} />
<EditorManager />
</div>
<WritingAssistant />
{showSimilarFiles && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebars/FileSideBar/FileExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FixedSizeList as List } from 'react-window'

import { isFileNodeDirectory } from './utils'
import { useFileContext } from '@/contexts/FileContext'
import FileItemRows from './Rows'
import FileItemRows from './FileItemRows'

interface FileExplorerProps {
lheight?: number
Expand Down

0 comments on commit 26ab604

Please sign in to comment.