added ntfy
This commit is contained in:
@@ -10,12 +10,16 @@ export const useButtons = () => {
|
||||
const handleButton = (button: "main" | "menu" | "left" | "right") => () => {
|
||||
switch (button) {
|
||||
case "main":
|
||||
if (page === "mission") {
|
||||
if (page === "mission" || page === "new-mission") {
|
||||
setPage({ page: "acknowledge" });
|
||||
}
|
||||
break;
|
||||
case "menu":
|
||||
console.log("home", page, { station, user });
|
||||
if (page === "mission" || page === "new-mission") {
|
||||
setPage({ page: "acknowledge" });
|
||||
if (station && user) setPage({ page: "home", station, user });
|
||||
break;
|
||||
}
|
||||
if (station && user) {
|
||||
setPage({ page: "home", station, user });
|
||||
} else {
|
||||
|
||||
@@ -130,16 +130,20 @@ export const ConnectionBtn = () => {
|
||||
type="submit"
|
||||
onSubmit={() => false}
|
||||
onClick={() => {
|
||||
connection.connect(
|
||||
uid,
|
||||
form.selectedStationId?.toString() || "",
|
||||
form.logoffTime || "",
|
||||
stations?.find(
|
||||
(station) =>
|
||||
station.id ===
|
||||
parseInt(form.selectedStationId?.toString() || ""),
|
||||
)!,
|
||||
const selectedStation = stations?.find(
|
||||
(station) =>
|
||||
station.id ===
|
||||
parseInt(form.selectedStationId?.toString() || ""),
|
||||
);
|
||||
if (selectedStation) {
|
||||
connection.connect(
|
||||
uid,
|
||||
form.selectedStationId?.toString() || "",
|
||||
form.logoffTime || "",
|
||||
selectedStation,
|
||||
session.data!.user,
|
||||
);
|
||||
}
|
||||
}}
|
||||
className="btn btn-soft btn-info"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user