Skip to content

Commit

Permalink
fix(demo): Can access unexist folder by create folder dialog in demo …
Browse files Browse the repository at this point in the history
…mode
  • Loading branch information
NriotHrreion committed Aug 9, 2024
1 parent 88b9a5b commit 9e99e0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/dialogs/create-folder-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useForm } from "react-hook-form";
import { DialogStore, useDialog } from "@/hooks/useDialog";
import { useExplorer } from "@/hooks/useExplorer";
import { useFolder } from "@/hooks/useFolder";
import { isDemo } from "@/lib/global";

const schema = z.object({
folderName: z.string().min(1, { message: "请输入文件夹名称" }).optional(),
Expand Down Expand Up @@ -71,7 +72,8 @@ const CreateFolderDialog: React.FC = () => {
autoComplete="off"/>

<Checkbox
{...form.register("enterFolder")}>
{...form.register("enterFolder")}
isDisabled={isDemo}>
创建后进入文件夹
</Checkbox>
</ModalBody>
Expand Down

0 comments on commit 9e99e0d

Please sign in to comment.