Skip to content

Commit

Permalink
wip: remove test data from sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
going-confetti committed Jan 9, 2025
1 parent ab12eca commit 0a67a00
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions src/components/Layout/Sidebar/Sidebar.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { orderBy } from 'lodash-es'
import { useEffect, useMemo } from 'react'

function orderByFileName(files: Map<string, StudioFile>) {
console.log('TEST:', files.keys(), files.values())
return orderBy([...files.values()], (s) => s.fileName)
}

Expand All @@ -20,16 +19,13 @@ function useFolderContent() {
const scripts = useStudioUIStore((s) => orderByFileName(s.scripts))
const data = useStudioUIStore((s) => orderByFileName(s.data))

console.log('TEST', recordings)

const addFile = useStudioUIStore((s) => s.addFile)
const removeFile = useStudioUIStore((s) => s.removeFile)
const setFolderContent = useStudioUIStore((s) => s.setFolderContent)

useEffect(() => {
;(async () => {
const files = await window.studio.ui.getFiles()
console.log('TEST:', files.recordings, toFileMap(files.recordings))

setFolderContent({
recordings: toFileMap(files.recordings),
Expand Down
7 changes: 1 addition & 6 deletions src/components/Layout/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface SidebarProps {

export function Sidebar({ isExpanded, onCollapseSidebar }: SidebarProps) {
const [searchTerm, setSearchTerm] = useState('')
const { recordings, generators, scripts, data } = useFiles(searchTerm)
const { recordings, generators, scripts } = useFiles(searchTerm)

const createNewGenerator = useCreateGenerator()

Expand Down Expand Up @@ -100,11 +100,6 @@ export function Sidebar({ isExpanded, onCollapseSidebar }: SidebarProps) {
files={scripts}
noFilesMessage="No scripts found"
/>
<FileTree
label="Data files"
files={data}
noFilesMessage="No data found"
/>
</Flex>
</ScrollArea>
</Flex>
Expand Down

0 comments on commit 0a67a00

Please sign in to comment.