chore:little fixes and formating and linting and patches
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import { useMutation, useQuery } from '@tanstack/react-query';
|
||||
import { Link } from '@tanstack/react-router';
|
||||
import { EyeIcon, Globe2Icon, LockIcon } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
@@ -8,9 +11,6 @@ import {
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
import { useTRPC } from '@/integrations/trpc/react';
|
||||
import { pushModal } from '@/modals';
|
||||
import { useMutation, useQuery } from '@tanstack/react-query';
|
||||
import { Link } from '@tanstack/react-router';
|
||||
import { EyeIcon, Globe2Icon, LockIcon } from 'lucide-react';
|
||||
|
||||
interface OverviewShareProps {
|
||||
projectId: string;
|
||||
@@ -25,8 +25,8 @@ export function OverviewShare({ projectId }: OverviewShareProps) {
|
||||
},
|
||||
{
|
||||
retry: 0,
|
||||
},
|
||||
),
|
||||
}
|
||||
)
|
||||
);
|
||||
const data = query.data;
|
||||
const mutation = useMutation(
|
||||
@@ -34,7 +34,7 @@ export function OverviewShare({ projectId }: OverviewShareProps) {
|
||||
onSuccess() {
|
||||
query.refetch();
|
||||
},
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -42,8 +42,8 @@ export function OverviewShare({ projectId }: OverviewShareProps) {
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
icon={data?.public ? Globe2Icon : LockIcon}
|
||||
responsive
|
||||
loading={query.isLoading}
|
||||
responsive
|
||||
>
|
||||
{data?.public ? 'Public' : 'Private'}
|
||||
</Button>
|
||||
@@ -52,17 +52,17 @@ export function OverviewShare({ projectId }: OverviewShareProps) {
|
||||
<DropdownMenuGroup>
|
||||
{(!data || data.public === false) && (
|
||||
<DropdownMenuItem onClick={() => pushModal('ShareOverviewModal')}>
|
||||
<Globe2Icon size={16} className="mr-2" />
|
||||
<Globe2Icon className="mr-2" size={16} />
|
||||
Make public
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{data?.public && (
|
||||
<DropdownMenuItem asChild>
|
||||
<Link
|
||||
to={'/share/overview/$shareId'}
|
||||
params={{ shareId: data.id }}
|
||||
to={'/share/overview/$shareId'}
|
||||
>
|
||||
<EyeIcon size={16} className="mr-2" />
|
||||
<EyeIcon className="mr-2" size={16} />
|
||||
View
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
@@ -77,7 +77,7 @@ export function OverviewShare({ projectId }: OverviewShareProps) {
|
||||
});
|
||||
}}
|
||||
>
|
||||
<LockIcon size={16} className="mr-2" />
|
||||
<LockIcon className="mr-2" size={16} />
|
||||
Make private
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user