formatting
This commit is contained in:
4990
pnpm-lock.yaml
generated
4990
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,7 @@ const LoginForm = () => {
|
|||||||
data: formData,
|
data: formData,
|
||||||
});
|
});
|
||||||
setToken(response.data.data.token);
|
setToken(response.data.data.token);
|
||||||
} catch (error) { }
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -13,11 +13,7 @@ const Player = ({ audioUrl }) => {
|
|||||||
<Box sx={{ display: "flex", alignItems: "center", gap: 1, justifyContent: "center" }}>
|
<Box sx={{ display: "flex", alignItems: "center", gap: 1, justifyContent: "center" }}>
|
||||||
<div ref={containerRef} style={{ width: 180 }} />
|
<div ref={containerRef} style={{ width: 180 }} />
|
||||||
<IconButton aria-label="play-pause" onClick={playPause}>
|
<IconButton aria-label="play-pause" onClick={playPause}>
|
||||||
{isPlaying ? (
|
{isPlaying ? <PauseIcon sx={{ color: "#d32f2f" }} /> : <PlayArrowIcon sx={{ color: "#1b4332" }} />}
|
||||||
<PauseIcon sx={{ color: "#d32f2f" }} />
|
|
||||||
) : (
|
|
||||||
<PlayArrowIcon sx={{ color: "#1b4332" }} />
|
|
||||||
)}
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export const AuthProvider = ({ children }) => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
clearToken()
|
clearToken();
|
||||||
clearUser();
|
clearUser();
|
||||||
changeAuthState(false);
|
changeAuthState(false);
|
||||||
changeInitAuth(true);
|
changeInitAuth(true);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const useRequest = (initOptions) => {
|
|||||||
url,
|
url,
|
||||||
method,
|
method,
|
||||||
data: method === "get" ? null : mergedOptions.data,
|
data: method === "get" ? null : mergedOptions.data,
|
||||||
headers: { authorization: `Bearer ${token}`, ...mergedOptions.headers, },
|
headers: { authorization: `Bearer ${token}`, ...mergedOptions.headers },
|
||||||
});
|
});
|
||||||
if (mergedOptions.hasSidebarUpdate) {
|
if (mergedOptions.hasSidebarUpdate) {
|
||||||
if (method === "post" || method === "put" || method === "delete") sidebarUpdate();
|
if (method === "post" || method === "put" || method === "delete") sidebarUpdate();
|
||||||
|
|||||||
Reference in New Issue
Block a user