chore(root): migrate to biome
This commit is contained in:
@@ -17,7 +17,7 @@ import { toast } from 'sonner';
|
||||
import type { IServiceInvite, IServiceProject } from '@openpanel/db';
|
||||
|
||||
export function useColumns(
|
||||
projects: IServiceProject[]
|
||||
projects: IServiceProject[],
|
||||
): ColumnDef<IServiceInvite>[] {
|
||||
return [
|
||||
{
|
||||
|
||||
@@ -21,11 +21,11 @@ export const InvitesTable = ({ projects, data }: Props) => {
|
||||
if (!data) {
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useState } from 'react';
|
||||
import { TooltipComplete } from '@/components/tooltip-complete';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ComboboxAdvanced } from '@/components/ui/combobox-advanced';
|
||||
@@ -12,6 +11,7 @@ import { api } from '@/trpc/client';
|
||||
import type { ColumnDef, Row } from '@tanstack/react-table';
|
||||
import { MoreHorizontalIcon } from 'lucide-react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useState } from 'react';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import type { IServiceMember, IServiceProject } from '@openpanel/db';
|
||||
@@ -77,7 +77,7 @@ function AccessCell({
|
||||
projects: IServiceProject[];
|
||||
}) {
|
||||
const [access, setAccess] = useState<string[]>(
|
||||
row.original.access.map((item) => item.projectId)
|
||||
row.original.access.map((item) => item.projectId),
|
||||
);
|
||||
const mutation = api.organization.updateMemberAccess.useMutation();
|
||||
|
||||
@@ -106,13 +106,13 @@ function ActionsCell({ row }: { row: Row<IServiceMember> }) {
|
||||
const revoke = api.organization.removeMember.useMutation({
|
||||
onSuccess() {
|
||||
toast.success(
|
||||
`${row.original.user?.firstName} has been removed from the organization`
|
||||
`${row.original.user?.firstName} has been removed from the organization`,
|
||||
);
|
||||
router.refresh();
|
||||
},
|
||||
onError() {
|
||||
toast.error(
|
||||
`Failed to remove ${row.original.user?.firstName} from the organization`
|
||||
`Failed to remove ${row.original.user?.firstName} from the organization`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -21,11 +21,11 @@ export const MembersTable = ({ projects, data }: Props) => {
|
||||
if (!data) {
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4"></div>
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
<div className="card h-[74px] w-full animate-pulse items-center justify-between rounded-lg p-4" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user