Use a key that doesn't change to avoid re-render issues; closes #2203

This commit is contained in:
Dane Everitt 2020-08-01 18:48:58 -07:00
parent 21a4ce8043
commit b92c97060b
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 12 additions and 11 deletions

View file

@ -6,7 +6,6 @@ import Field from '@/components/elements/Field';
import { join } from 'path';
import { object, string } from 'yup';
import createDirectory from '@/api/server/files/createDirectory';
import v4 from 'uuid/v4';
import tw from 'twin.macro';
import Button from '@/components/elements/Button';
import { mutate } from 'swr';
@ -24,7 +23,7 @@ const schema = object().shape({
});
const generateDirectoryData = (name: string): FileObject => ({
uuid: v4(),
key: `dir_${name}`,
name: name,
mode: '0644',
size: 0,