console.logs entfernt
This commit is contained in:
@@ -57,7 +57,6 @@ export function QueryProvider({ children }: { children: ReactNode }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleNotification = (notification: NotificationPayload) => {
|
const handleNotification = (notification: NotificationPayload) => {
|
||||||
console.log("notification", notification);
|
|
||||||
switch (notification.type) {
|
switch (notification.type) {
|
||||||
case "hpg-validation":
|
case "hpg-validation":
|
||||||
toast.custom(
|
toast.custom(
|
||||||
|
|||||||
@@ -227,7 +227,6 @@ const AircraftMarker = ({ aircraft }: { aircraft: ConnectedAircraft & { Station:
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
console.log("Marker clicked", aircraft.id);
|
|
||||||
const open = openAircraftMarker.some((m) => m.id === aircraft.id);
|
const open = openAircraftMarker.some((m) => m.id === aircraft.id);
|
||||||
if (open) {
|
if (open) {
|
||||||
setOpenAircraftMarker({
|
setOpenAircraftMarker({
|
||||||
|
|||||||
@@ -24,14 +24,10 @@ const Map = () => {
|
|||||||
}, [map, setMap]);
|
}, [map, setMap]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log("Map center or zoom changed");
|
|
||||||
|
|
||||||
if (ref.current) {
|
if (ref.current) {
|
||||||
const center = ref.current?.getCenter();
|
const center = ref.current?.getCenter();
|
||||||
const zoom = ref.current?.getZoom();
|
const zoom = ref.current?.getZoom();
|
||||||
console.log("Map center or zoom changed", center.equals(map.center), zoom === map.zoom);
|
|
||||||
if (!center.equals(map.center) || zoom !== map.zoom) {
|
if (!center.equals(map.center) || zoom !== map.zoom) {
|
||||||
console.log("Updating map center and zoom");
|
|
||||||
ref.current.setView(map.center, map.zoom);
|
ref.current.setView(map.center, map.zoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ export const handleTrackSubscribed = (
|
|||||||
publication: RemoteTrackPublication,
|
publication: RemoteTrackPublication,
|
||||||
participant: RemoteParticipant,
|
participant: RemoteParticipant,
|
||||||
) => {
|
) => {
|
||||||
console.log("Track subscribed:", track, publication, participant);
|
|
||||||
if (!track.isMuted) {
|
if (!track.isMuted) {
|
||||||
useAudioStore.getState().addSpeakingParticipant(participant);
|
useAudioStore.getState().addSpeakingParticipant(participant);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ export const kickAircraftAPI = async ({
|
|||||||
const res = await serverApi.delete(`/aircrafts/${id}`, {
|
const res = await serverApi.delete(`/aircrafts/${id}`, {
|
||||||
data: { bann, reason, until },
|
data: { bann, reason, until },
|
||||||
});
|
});
|
||||||
console.log(res.status);
|
|
||||||
if (res.status != 204) {
|
if (res.status != 204) {
|
||||||
throw new Error("Failed to kick aircraft");
|
throw new Error("Failed to kick aircraft");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ export const kickDispatcherAPI = async ({
|
|||||||
const res = await serverApi.delete(`/dispatcher/${id}`, {
|
const res = await serverApi.delete(`/dispatcher/${id}`, {
|
||||||
data: { bann, reason, until },
|
data: { bann, reason, until },
|
||||||
});
|
});
|
||||||
console.log(res.status);
|
|
||||||
if (res.status != 204) {
|
if (res.status != 204) {
|
||||||
throw new Error("Failed to kick aircraft");
|
throw new Error("Failed to kick aircraft");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ dispatchSocket.on("disconnect", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dispatchSocket.on("force-disconnect", (reason: string) => {
|
dispatchSocket.on("force-disconnect", (reason: string) => {
|
||||||
console.log("force-disconnect", reason);
|
|
||||||
useDispatchConnectionStore.setState({
|
useDispatchConnectionStore.setState({
|
||||||
status: "disconnected",
|
status: "disconnected",
|
||||||
message: reason,
|
message: reason,
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ pilotSocket.on("disconnect", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
pilotSocket.on("force-disconnect", (reason: string) => {
|
pilotSocket.on("force-disconnect", (reason: string) => {
|
||||||
console.log("force-disconnect", reason);
|
|
||||||
usePilotConnectionStore.setState({
|
usePilotConnectionStore.setState({
|
||||||
status: "disconnected",
|
status: "disconnected",
|
||||||
message: reason,
|
message: reason,
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ export const PenaltyCountdown: React.FC<PenaltyCountdownProps> = ({ until }) =>
|
|||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [until, mounted]);
|
}, [until, mounted]);
|
||||||
|
|
||||||
console.log("PenaltyCountdown until:", until, "timeLeft:", timeLeft);
|
|
||||||
|
|
||||||
if (!mounted) return null;
|
if (!mounted) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ export const ProfileForm = ({
|
|||||||
},
|
},
|
||||||
resolver: zodResolver(schema),
|
resolver: zodResolver(schema),
|
||||||
});
|
});
|
||||||
console.log(user);
|
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
className="card-body"
|
className="card-body"
|
||||||
|
|||||||
30
apps/hub/app/vatsim/page.tsx
Normal file
30
apps/hub/app/vatsim/page.tsx
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
"use client";
|
||||||
|
import { User } from "@repo/db";
|
||||||
|
import { ColumnDef } from "@tanstack/react-table";
|
||||||
|
import { PaginatedTable } from "_components/PaginatedTable";
|
||||||
|
|
||||||
|
export default function () {
|
||||||
|
return (
|
||||||
|
<PaginatedTable
|
||||||
|
searchFields={["firstname", "lastname", "vatsimCid"]}
|
||||||
|
prismaModel={"user"}
|
||||||
|
filter={{
|
||||||
|
vatsimCid: {
|
||||||
|
gt: 1,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
leftOfSearch={<h1 className="text-2xl font-bold">Vatsim-Nutzer</h1>}
|
||||||
|
columns={
|
||||||
|
[
|
||||||
|
{ header: "Vorname", accessorKey: "firstname" },
|
||||||
|
{
|
||||||
|
header: "Nachname",
|
||||||
|
accessorKey: "lastname",
|
||||||
|
cell: ({ row }) => row.original.lastname[0],
|
||||||
|
},
|
||||||
|
{ header: "Vatsim CID", accessorKey: "vatsimCid" },
|
||||||
|
] as ColumnDef<User>[]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user