- added websocket context to connect to websockets if needed

This commit is contained in:
2025-12-15 16:07:30 +00:00
parent cae652477e
commit 555330991d
10 changed files with 510 additions and 62 deletions

View File

@@ -17,7 +17,6 @@ const WiFiSettingsForm = () => {
const initialValues = {
ssid: wifiSSID ?? "",
password: wifiPassword ?? "",
encryption: "WPA2",
};
const validatePassword = (password: string) => {
@@ -83,22 +82,7 @@ const WiFiSettingsForm = () => {
/>
</div>
</FormGroup>
<FormGroup>
<label htmlFor="encryption" className="font-medium whitespace-nowrap md:w-2/3">
WPA/Encryption Type
</label>
<Field
id="encryption"
name="encryption"
className="p-2 border border-gray-400 rounded-lg text-white bg-[#253445] flex-1 w-2/3"
as="select"
>
<option value="WPA2">WPA2</option>
<option value="WPA3">WPA3</option>
<option value="WEP">WEP</option>
<option value="None">None</option>
</Field>
</FormGroup>
<button
type="submit"
className="w-1/4 text-white bg-green-700 hover:bg-green-800 font-small rounded-lg text-sm px-2 py-2.5"

View File

@@ -21,7 +21,6 @@ type SightingModalProps = {
};
const SightingModal = ({ isSightingModalOpen, handleClose, sighting, onDelete }: SightingModalProps) => {
console.log(sighting);
const { dispatch } = useAlertHitContext();
const { query, mutation } = useCameraBlackboard();

View File

@@ -13,8 +13,11 @@ import {
import { useState } from "react";
import SoundBtn from "./SoundBtn";
import { useIntegrationsContext } from "../../context/IntegrationsContext";
import { useInfoBarSocket } from "../../context/WebsocketContext";
export default function Header() {
const { data: stats } = useInfoBarSocket();
console.log(stats);
const [isFullscreen, setIsFullscreen] = useState(false);
const [isMenuOpen, setIsMenuOpen] = useState(false);
const { state } = useIntegrationsContext();