Dispo-Option, die HPG validierung nicht zu nutzen
This commit is contained in:
@@ -3,15 +3,17 @@ import { useEffect, useRef, useState } from "react";
|
||||
import { GearIcon } from "@radix-ui/react-icons";
|
||||
import { Bell, SettingsIcon, Volume2 } from "lucide-react";
|
||||
import MicVolumeBar from "_components/MicVolumeIndication";
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { editUserAPI, getUserAPI } from "_querys/user";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { useAudioStore } from "_store/audioStore";
|
||||
import toast from "react-hot-toast";
|
||||
import Link from "next/link";
|
||||
import { Button } from "@repo/shared-components";
|
||||
|
||||
export const SettingsBtn = () => {
|
||||
const session = useSession();
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const [inputDevices, setInputDevices] = useState<MediaDeviceInfo[]>([]);
|
||||
const { data: user } = useQuery({
|
||||
@@ -22,6 +24,10 @@ export const SettingsBtn = () => {
|
||||
|
||||
const editUserMutation = useMutation({
|
||||
mutationFn: editUserAPI,
|
||||
mutationKey: ["user", session.data?.user.id],
|
||||
onSuccess: async () => {
|
||||
await queryClient.invalidateQueries({ queryKey: ["user", session.data?.user.id] });
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -248,7 +254,7 @@ export const SettingsBtn = () => {
|
||||
>
|
||||
Schließen
|
||||
</button>
|
||||
<button
|
||||
<Button
|
||||
className="btn btn-soft btn-success"
|
||||
type="submit"
|
||||
onSubmit={() => false}
|
||||
@@ -275,7 +281,7 @@ export const SettingsBtn = () => {
|
||||
}}
|
||||
>
|
||||
Speichern
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
Reference in New Issue
Block a user