Skip to content

Commit

Permalink
UserExtended type
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Sep 11, 2023
1 parent 77547db commit 59c0155
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/modules/table/memberHeaderColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useTranslations } from "next-intl";
import TimeAgo from "react-timeago";
import { type ColumnDef, createColumnHelper, Row } from "@tanstack/react-table";
import { type NetworkMemberNotation, type MemberEntity } from "~/types/local/member";
import { User, UserOptions } from "@prisma/client";

enum ConnectionStatus {
Offline = 0,
Expand All @@ -21,6 +22,12 @@ interface IProp {
central: boolean;
}

interface UserExtended extends User {
options: UserOptions & {
deAuthorizeWarning: boolean;
};
}

const sortingMemberHex = (
rowA: Row<MemberEntity>,
rowB: Row<MemberEntity>,
Expand Down Expand Up @@ -60,7 +67,7 @@ const sortingIpaddress = (
export const MemberHeaderColumns = ({ nwid, central = false }: IProp) => {
const t = useTranslations();
const { callModal } = useModalStore((state) => state);
const { data: me } = api.auth.me.useQuery();
const { data: me } = api.auth.me.useQuery<UserExtended>();
const { data: networkById, refetch: refetchNetworkById } =
api.network.getNetworkById.useQuery(
{
Expand Down

0 comments on commit 59c0155

Please sign in to comment.