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 59c0155 commit ae2d862
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/user-settings/network/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ import { type ReactElement } from "react";
import { LayoutAuthenticated } from "~/components/layouts/layout";
import { api } from "~/utils/api";
import { useTranslations } from "use-intl";
import { User, UserOptions } from "@prisma/client";

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

const UserNetworkSetting = () => {
const t = useTranslations("userSettings");
const { mutate: updateSettings } = api.auth.updateUserOptions.useMutation();

const { data: me, refetch: refetchMe } = api.auth.me.useQuery();
const { data: me, refetch: refetchMe } = api.auth.me.useQuery<UserExtended>();

return (
<main className="mx-auto flex w-full flex-col justify-center space-y-5 bg-base-100 p-3 sm:w-6/12">
Expand Down

0 comments on commit ae2d862

Please sign in to comment.