import { Flex, Stack, Text } from '@chakra-ui/react'; import React from 'react'; import { useMiraFiles } from '../state/workspace'; export const FileTreeView: React.VFC = () => { const { miraFiles, activeFilePath, setActiveFilePath } = useMiraFiles(); return ( {miraFiles.map(({ path }) => ( setActiveFilePath(path)} px={2} py={1} backgroundColor={path === activeFilePath ? 'gray.100' : 'transparent'} _hover={{ backgroundColor: 'gray.100', }} > {path} ))} ); };