28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import { getConnectedDispatcherAPI } from "_querys/connected-user";
|
|
import { useState } from "react";
|
|
|
|
export const ConnectedDispatcher = () => {
|
|
const [open, setOpen] = useState(false);
|
|
const { data: dispatcher } = useQuery({
|
|
queryKey: ["dispatcher"],
|
|
queryFn: () => getConnectedDispatcherAPI(),
|
|
refetchInterval: 10000,
|
|
});
|
|
console.log("ConnectedDispatcher", dispatcher);
|
|
|
|
return (
|
|
<div className="absolute top-0 left-0 w-[300px] ">
|
|
<div className="bg-base-100 border-base-300 collapse border">
|
|
<input type="checkbox" className="peer" />
|
|
<div className="collapse-title bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content">
|
|
How do I create an account?
|
|
</div>
|
|
<div className="collapse-content bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content">
|
|
Click the "Sign Up" button in the top right corner and follow the registration process.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|