Skip to content

Commit

Permalink
use Anyone for auth
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaJ2305 committed Dec 24, 2024
1 parent a1d19d3 commit 6bc0559
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/Common/Export.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ShadcnMenuDropdownItemProps } from "@/components/Common/Menu";
import useExport from "@/hooks/useExport";
import { useIsAuthorized } from "@/hooks/useIsAuthorized";

import { Anyone } from "@/Utils/AuthorizeFor";
import request from "@/Utils/request/request";
import { Route } from "@/Utils/request/types";

Expand Down Expand Up @@ -56,9 +57,7 @@ function ExportMenuItem({
parse?: (data: string) => string,
) => void;
}) {
const isAuthorized = item.options?.authorizeFor
? useIsAuthorized(item.options.authorizeFor)
: true;
const isAuthorized = useIsAuthorized(item.options?.authorizeFor || Anyone);

return (
<DropdownMenuItem
Expand Down

0 comments on commit 6bc0559

Please sign in to comment.