🔌 Cleaned up styling for AirDC++ socket status

This commit is contained in:
2023-01-19 21:07:07 -08:00
parent 0e72d64009
commit 25b706c4f2
5 changed files with 74 additions and 14 deletions

View File

@@ -38,18 +38,20 @@ function sleep(ms: number): Promise<NodeJS.Timeout> {
}
export const toggleAirDCPPSocketConnectionStatus =
(status: String) => async (dispatch) => {
(status: String, payload?: any) => async (dispatch) => {
console.log("sanul", status);
switch (status) {
case "connected":
dispatch({
type: AIRDCPP_SOCKET_CONNECTED,
data: payload,
});
break;
case "disconnected":
dispatch({
type: AIRDCPP_SOCKET_DISCONNECTED,
data: payload,
});
break;