mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
explorer/reducers: don't use FileMetadata
This separates the explorer files state from the fileStorage FileMetadata. The latter contains extra info that the explorer doesn't need. This will prevent rerendering each time the file contents change.
This commit is contained in:
@@ -45,7 +45,7 @@ const NewFileWizard: React.VoidFunctionComponent<NewFileWizardProps> = ({
|
||||
const fileNameValidation = validateFileName(
|
||||
fileName,
|
||||
pythonFileExtension,
|
||||
files.map((f) => f.path),
|
||||
files.map((f) => f.name),
|
||||
);
|
||||
const [hubType, setHubType] = useState(defaultHub);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user