修复打包问题
This commit is contained in:
@@ -2,6 +2,6 @@ VITE_API_URL=
|
|||||||
VITE_STORE_PREFIX=senmeshzc
|
VITE_STORE_PREFIX=senmeshzc
|
||||||
VITE_BASEPATH=
|
VITE_BASEPATH=
|
||||||
VITE_APP_TITLE=森睿智传
|
VITE_APP_TITLE=森睿智传
|
||||||
VITE_IS_INSIDE=true
|
VITE_IS_INSIDE=false
|
||||||
VITE_DOMAIN=
|
VITE_DOMAIN=
|
||||||
VITE_INIT_PASSWORD="Qaz123567!@#"
|
VITE_INIT_PASSWORD="Qaz123567!@#"
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,3 +22,4 @@ dist-ssr
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
*.zip
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc -b && vite build",
|
"prod": "tsc -b && vite build",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,29 +2,35 @@ import { http, HTTP_CONTENT_TYPE } from "@/lib/http";
|
|||||||
|
|
||||||
const baseUrl = import.meta.env.VITE_API_URL;
|
const baseUrl = import.meta.env.VITE_API_URL;
|
||||||
|
|
||||||
export enum RootType {
|
export const RootType = {
|
||||||
// 1普通/2内穿外/3外传内/4我的分享
|
// 1普通/2内穿外/3外传内/4我的分享
|
||||||
MY = "1",
|
MY: "1",
|
||||||
INSIDE = "2",
|
INSIDE: "2",
|
||||||
OUTSIDE = "3",
|
OUTSIDE: "3",
|
||||||
SHARE = "4",
|
SHARE: "4",
|
||||||
}
|
} as const;
|
||||||
|
|
||||||
export enum FileStatus {
|
export type RootType = (typeof RootType)[keyof typeof RootType];
|
||||||
|
|
||||||
|
export const FileStatus = {
|
||||||
// 1正常2失效11解析中12待审核13传输中14失败
|
// 1正常2失效11解析中12待审核13传输中14失败
|
||||||
VALID = "1",
|
VALID: "1",
|
||||||
INVALID = "2",
|
INVALID: "2",
|
||||||
PARSING = "11",
|
PARSING: "11",
|
||||||
AUDITING = "12",
|
AUDITING: "12",
|
||||||
TRANSFERING = "13",
|
TRANSFERING: "13",
|
||||||
FAILED = "14",
|
FAILED: "14",
|
||||||
}
|
} as const;
|
||||||
|
|
||||||
export enum FileType {
|
export type FileStatus = (typeof FileStatus)[keyof typeof FileStatus];
|
||||||
|
|
||||||
|
export const FileType = {
|
||||||
// 1文件/2目录
|
// 1文件/2目录
|
||||||
FILE = "1",
|
FILE: "1",
|
||||||
DIRECTORY = "2",
|
DIRECTORY: "2",
|
||||||
}
|
} as const;
|
||||||
|
|
||||||
|
export type FileType = (typeof FileType)[keyof typeof FileType];
|
||||||
|
|
||||||
// 获取文件下载地址
|
// 获取文件下载地址
|
||||||
export const getFileUrl = (code?: string, appendBaseUrl = true) => {
|
export const getFileUrl = (code?: string, appendBaseUrl = true) => {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export function DataTable<TData>({
|
|||||||
? null
|
? null
|
||||||
: flexRender(
|
: flexRender(
|
||||||
header.column.columnDef.header,
|
header.column.columnDef.header,
|
||||||
header.getContext()
|
header.getContext(),
|
||||||
)}
|
)}
|
||||||
</TableHead>
|
</TableHead>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
import { Spinner } from "@/components/ui/spinner";
|
import { Spinner } from "@/components/ui/spinner";
|
||||||
import { FileType, getFilePage } from "@/apis/file";
|
import { FileType, getFilePage } from "@/apis/file";
|
||||||
import { Folder, FolderInput, CircleAlert, MoveRight } from "lucide-react";
|
import { Folder, FolderInput, MoveRight } from "lucide-react";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
||||||
import { DirectoryBreadcrumb } from "@/components/directory-breadcrumb";
|
import { DirectoryBreadcrumb } from "@/components/directory-breadcrumb";
|
||||||
@@ -66,7 +66,7 @@ export function MoveFileDialog({
|
|||||||
// 选中行
|
// 选中行
|
||||||
const [rowSelection, setRowSelection] = useState({});
|
const [rowSelection, setRowSelection] = useState({});
|
||||||
// 当前打开的目录层级
|
// 当前打开的目录层级
|
||||||
const [openDirectorys, setOpenDirectorys] = useState([]);
|
const [openDirectorys, setOpenDirectorys] = useState<any[]>([]);
|
||||||
// 文件目录ID
|
// 文件目录ID
|
||||||
const [parentId, setParentId] = useState(0);
|
const [parentId, setParentId] = useState(0);
|
||||||
// 分页
|
// 分页
|
||||||
@@ -213,7 +213,6 @@ export function MoveFileDialog({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Alert className="!bg-amber-50 !border-amber-200">
|
<Alert className="!bg-amber-50 !border-amber-200">
|
||||||
<CircleAlert />
|
|
||||||
<AlertTitle>
|
<AlertTitle>
|
||||||
您确定要将{data?.fileType === FileType.DIRECTORY ? "目录" : "文件"}
|
您确定要将{data?.fileType === FileType.DIRECTORY ? "目录" : "文件"}
|
||||||
移动到该目录下吗?
|
移动到该目录下吗?
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {
|
|||||||
Folder,
|
Folder,
|
||||||
FolderPlus,
|
FolderPlus,
|
||||||
FolderInput,
|
FolderInput,
|
||||||
Eye,
|
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { EditFileDialog } from "./-components/EditFileDialog";
|
import { EditFileDialog } from "./-components/EditFileDialog";
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
import { Spinner } from "@/components/ui/spinner";
|
import { Spinner } from "@/components/ui/spinner";
|
||||||
import { useBatchRemoveFile } from "../-hooks/useBatchRemoveFile";
|
import { useBatchRemoveFile } from "../-hooks/useBatchRemoveFile";
|
||||||
|
import { toast } from "sonner";
|
||||||
|
|
||||||
type BatchRemoveConfirmDialogProps = {
|
type BatchRemoveConfirmDialogProps = {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@@ -32,6 +33,10 @@ export function BatchRemoveConfirmDialog({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
|
if (!ids?.length) {
|
||||||
|
toast("请至少选择一个文件/目录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
batchRemove(ids);
|
batchRemove(ids);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const useBatchRemoveFile = (mutationOptions?: any) => {
|
|||||||
const {
|
const {
|
||||||
mutateAsync: batchRemoveMutateAsync,
|
mutateAsync: batchRemoveMutateAsync,
|
||||||
isPending: batchRemoveIsPending,
|
isPending: batchRemoveIsPending,
|
||||||
} = useMutation({
|
} = useMutation<any, Error, number[]>({
|
||||||
mutationFn: removeFileByIds,
|
mutationFn: removeFileByIds,
|
||||||
...(mutationOptions || {}),
|
...(mutationOptions || {}),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { toast } from "sonner";
|
|||||||
|
|
||||||
export const useRecoverFile = (mutationOptions?: any) => {
|
export const useRecoverFile = (mutationOptions?: any) => {
|
||||||
const { mutateAsync: recoverMutateAsync, isPending: recoverIsPending } =
|
const { mutateAsync: recoverMutateAsync, isPending: recoverIsPending } =
|
||||||
useMutation({
|
useMutation<any, Error, number>({
|
||||||
mutationFn: recoverFile,
|
mutationFn: recoverFile,
|
||||||
...(mutationOptions || {}),
|
...(mutationOptions || {}),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { toast } from "sonner";
|
|||||||
|
|
||||||
export const useRemoveFile = (mutationOptions?: any) => {
|
export const useRemoveFile = (mutationOptions?: any) => {
|
||||||
const { mutateAsync: removeMutateAsync, isPending: removeIsPending } =
|
const { mutateAsync: removeMutateAsync, isPending: removeIsPending } =
|
||||||
useMutation({
|
useMutation<any, Error, number>({
|
||||||
mutationFn: removeFile,
|
mutationFn: removeFile,
|
||||||
...(mutationOptions || {}),
|
...(mutationOptions || {}),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export function useColumns({
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
id: "select",
|
id: "select",
|
||||||
header: ({ table }) => (
|
header: ({ table }: any) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={
|
checked={
|
||||||
table.getIsAllPageRowsSelected() ||
|
table.getIsAllPageRowsSelected() ||
|
||||||
@@ -39,7 +39,7 @@ export function useColumns({
|
|||||||
onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
|
onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
cell: ({ row }) => (
|
cell: ({ row }: any) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={row.getIsSelected()}
|
checked={row.getIsSelected()}
|
||||||
onCheckedChange={(value) => row.toggleSelected(!!value)}
|
onCheckedChange={(value) => row.toggleSelected(!!value)}
|
||||||
@@ -206,7 +206,7 @@ function RouteComponent() {
|
|||||||
setOpen={setOpenBatchRemoveConfirmDialog}
|
setOpen={setOpenBatchRemoveConfirmDialog}
|
||||||
ids={table
|
ids={table
|
||||||
.getFilteredSelectedRowModel()
|
.getFilteredSelectedRowModel()
|
||||||
.rows.map((row) => row.original.id)}
|
.rows.map((row: any) => row.original.id)}
|
||||||
refetch={query.refetch}
|
refetch={query.refetch}
|
||||||
/>
|
/>
|
||||||
<RemoveConfirmDialog
|
<RemoveConfirmDialog
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|||||||
import { AICreateRiskRule } from "./AICreateRiskRule";
|
import { AICreateRiskRule } from "./AICreateRiskRule";
|
||||||
import { ManualCreateRiskRule } from "./ManualCreateRiskRule";
|
import { ManualCreateRiskRule } from "./ManualCreateRiskRule";
|
||||||
import { useSaveRiskRule } from "../-hooks/useSaveRiskRule";
|
import { useSaveRiskRule } from "../-hooks/useSaveRiskRule";
|
||||||
import { nanoid } from "nanoid";
|
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
|
||||||
type CreateRiskRuleDialogProps = {
|
type CreateRiskRuleDialogProps = {
|
||||||
@@ -40,7 +39,7 @@ export function CreateRiskRuleDialog({
|
|||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogContent className="!max-w-[400px] overflow-auto">
|
<DialogContent className="!max-w-[500px] overflow-auto">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>风险预警设置</DialogTitle>
|
<DialogTitle>风险预警设置</DialogTitle>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export function ManualCreateRiskRule({ onSubmit, loading, onClose }: any) {
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>内容示例</FormLabel>
|
<FormLabel>内容示例</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea {...field} />
|
<Textarea {...field} rows={6} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -132,7 +132,7 @@ export function ManualCreateRiskRule({ onSubmit, loading, onClose }: any) {
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>判断依据</FormLabel>
|
<FormLabel>判断依据</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea {...field} />
|
<Textarea {...field} rows={6} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|||||||
@@ -1,151 +0,0 @@
|
|||||||
import { Settings, ShieldAlert, ShieldCheck } from "lucide-react";
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { RiskSettingDialog } from "./RiskSettingDialog";
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
|
||||||
import { getFilePageSuper } from "@/apis/file";
|
|
||||||
|
|
||||||
export function RiskList() {
|
|
||||||
const [openRiskSettingDialog, setOpenRiskSettingDialog] = useState(false);
|
|
||||||
|
|
||||||
const handle = (item: any) => {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
const trust = (item: any) => {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// 分页
|
|
||||||
const [pagination, setPagination] = useState({
|
|
||||||
pageIndex: 0,
|
|
||||||
pageSize: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
// 查询数据
|
|
||||||
const query = useQuery<any>({
|
|
||||||
queryKey: ["fileRiskList", pagination],
|
|
||||||
queryFn: () =>
|
|
||||||
getFilePageSuper({
|
|
||||||
pageSize: pagination.pageSize,
|
|
||||||
pageNo: pagination.pageIndex + 1,
|
|
||||||
}).then((res) => res.data),
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<RiskSettingDialog
|
|
||||||
open={openRiskSettingDialog}
|
|
||||||
setOpen={setOpenRiskSettingDialog}
|
|
||||||
/>
|
|
||||||
<div className="w-full">
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<div className="text-lg">风险告警</div>
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
variant="default"
|
|
||||||
onClick={() => setOpenRiskSettingDialog(true)}
|
|
||||||
>
|
|
||||||
<Settings />
|
|
||||||
风险告警设置
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{query?.data?.entityList.length > 0 ? (
|
|
||||||
<div className="mt-4 grid grid-cols-4 gap-2">
|
|
||||||
{query?.data?.entityList.map((item: any) => {
|
|
||||||
var file = JSON.parse(item.difyFileJson || "{}");
|
|
||||||
var risk = JSON.parse(item.riskJson || "{}");
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className="p-4 border border-solid border-black/10 rounded-lg"
|
|
||||||
key={item.id}
|
|
||||||
>
|
|
||||||
<div className="flex gap-2 items-start">
|
|
||||||
{risk.has_risk ? (
|
|
||||||
<div className="flex-none h-8 w-8 rounded-full flex items-center justify-center bg-red-500 text-white">
|
|
||||||
<ShieldAlert size={16} />
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className="flex-none h-8 w-8 rounded-full flex items-center justify-center bg-green-500 text-white">
|
|
||||||
<ShieldCheck size={16} />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="flex-auto">
|
|
||||||
<div className="text-base font-bold flex items-center gap-2 break-all leading-snug">
|
|
||||||
{file.name}
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-black/50">
|
|
||||||
{item.createTime}
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-black/50">
|
|
||||||
{risk.recommendation}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="mt-4 grid grid-cols-2 gap-2">
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
className="w-full"
|
|
||||||
onClick={() => handle(item)}
|
|
||||||
>
|
|
||||||
处理
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
className="w-full"
|
|
||||||
onClick={() => trust(item)}
|
|
||||||
>
|
|
||||||
信任
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className="flex items-center justify-center py-10">
|
|
||||||
<div className="text-sm text-muted-foreground">暂无数据</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="py-2 flex gap-2">
|
|
||||||
<div className="flex-auto"></div>
|
|
||||||
<div className="flex-none flex items-center gap-2">
|
|
||||||
<div className="text-sm text-muted-foreground mr-4">
|
|
||||||
当页共{query?.data?.entityList.length || 0}条,总共
|
|
||||||
{query?.data?.totalCount || 0}条
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
disabled={pagination.pageIndex === 0}
|
|
||||||
onClick={() =>
|
|
||||||
setPagination({
|
|
||||||
...pagination,
|
|
||||||
pageIndex: pagination.pageIndex - 1,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
>
|
|
||||||
上一页
|
|
||||||
</Button>
|
|
||||||
<Button disabled variant="ghost">
|
|
||||||
1 / 1
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
disabled={pagination.pageIndex === query?.data?.pageCount - 1}
|
|
||||||
onClick={() =>
|
|
||||||
setPagination({
|
|
||||||
...pagination,
|
|
||||||
pageIndex: pagination.pageIndex + 1,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
>
|
|
||||||
下一页
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -250,7 +250,7 @@ export function RiskSettingDialog({ open, setOpen }: RiskSettingDialogProps) {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2 overflow-auto max-h-[400px]">
|
<div className="mt-2 overflow-auto max-h-[400px]">
|
||||||
<DataTable table={table} query={query} showPagination={false} />
|
<DataTable table={table} query={query} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { AppLayout } from "@/components/app-layout";
|
import { AppLayout } from "@/components/app-layout";
|
||||||
import { useIsPlatformOrg } from "@/stores/user";
|
import { useIsPlatformOrg } from "@/stores/user";
|
||||||
import { createFileRoute } from "@tanstack/react-router";
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
import { ShieldAlert, Building2, Network, UserRoundPen } from "lucide-react";
|
import { ShieldAlert, Building2, UserRoundPen } from "lucide-react";
|
||||||
|
|
||||||
export const Route = createFileRoute("/admin")({
|
export const Route = createFileRoute("/admin")({
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const Route = createFileRoute("/admin/tenant/")({
|
|||||||
component: RouteComponent,
|
component: RouteComponent,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function useColumns({ handleEditOrg }: any) {
|
export function useColumns({ handleEditOrg: _handleEditOrg }: any) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
accessorKey: "orgName",
|
accessorKey: "orgName",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { toast } from "sonner";
|
|||||||
|
|
||||||
export const useCancelUser = (mutationOptions?: any) => {
|
export const useCancelUser = (mutationOptions?: any) => {
|
||||||
const { mutateAsync: cancelMutateAsync, isPending: cancelIsPending } =
|
const { mutateAsync: cancelMutateAsync, isPending: cancelIsPending } =
|
||||||
useMutation({
|
useMutation<any, Error, number>({
|
||||||
mutationFn: cancelUser,
|
mutationFn: cancelUser,
|
||||||
...(mutationOptions || {}),
|
...(mutationOptions || {}),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createFileRoute, useRouter, useSearch } from "@tanstack/react-router";
|
import { createFileRoute, useRouter } from "@tanstack/react-router";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
@@ -12,8 +12,6 @@ import {
|
|||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
import {
|
import {
|
||||||
Empty,
|
Empty,
|
||||||
EmptyContent,
|
|
||||||
EmptyDescription,
|
|
||||||
EmptyHeader,
|
EmptyHeader,
|
||||||
EmptyMedia,
|
EmptyMedia,
|
||||||
EmptyTitle,
|
EmptyTitle,
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ type UserStoreActions = {
|
|||||||
|
|
||||||
type UserStore = UserStoreState & UserStoreActions;
|
type UserStore = UserStoreState & UserStoreActions;
|
||||||
|
|
||||||
export const useUserStore = create<UserStore>(
|
export const useUserStore = create<UserStore>()(
|
||||||
persist(
|
persist(
|
||||||
subscribeWithSelector((set: any) => ({
|
subscribeWithSelector<UserStore>((set) => ({
|
||||||
token: null,
|
token: null,
|
||||||
user: null,
|
user: null,
|
||||||
org: null,
|
org: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user