mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-23 21:34:24 +00:00
chore: update error message toast
This commit is contained in:
@@ -76,7 +76,7 @@ const Auth: React.FC = () => {
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toastHelper.error(error.response.data.message);
|
||||
toastHelper.error(JSON.stringify(error.response.data));
|
||||
}
|
||||
actionBtnLoadingState.setFinish();
|
||||
};
|
||||
@@ -111,7 +111,7 @@ const Auth: React.FC = () => {
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toastHelper.error(error.response.data.message);
|
||||
toastHelper.error(JSON.stringify(error.response.data));
|
||||
}
|
||||
actionBtnLoadingState.setFinish();
|
||||
};
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Button, Input } from "@mui/joy";
|
||||
import { Button, Input, Tooltip } from "@mui/joy";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useAppSelector } from "../store";
|
||||
@@ -69,22 +69,24 @@ const UserDetail: React.FC = () => {
|
||||
<span className="mr-3 text-gray-500 font-mono">Email: </span>
|
||||
{user?.email}
|
||||
</p>
|
||||
<p className="leading-8 flex flex-row justify-start items-center">
|
||||
<div className="leading-8 flex flex-row justify-start items-center">
|
||||
<span className="mr-3 text-gray-500 font-mono">Password: </span>
|
||||
<Button variant="soft" onClick={handleChangePasswordBtnClick}>
|
||||
Change
|
||||
</Button>
|
||||
</p>
|
||||
<p className="leading-8 flex flex-row justify-start items-center">
|
||||
</div>
|
||||
<div className="leading-8 flex flex-row justify-start items-center">
|
||||
<span className="mr-3 text-gray-500 font-mono">OpenID:</span>
|
||||
<Input type="text" className="w-48" value={user?.openId} readOnly />
|
||||
<button className="-ml-6 z-1 bg-white text-gray-600 hover:text-black" onClick={handleCopyOpenIdBtnClick}>
|
||||
<Icon.Clipboard className="w-4 h-auto" />
|
||||
</button>
|
||||
<Tooltip title="Copy OpenID" variant="solid" placement="top">
|
||||
<button className="-ml-6 z-1 bg-white text-gray-600 hover:text-black" onClick={handleCopyOpenIdBtnClick}>
|
||||
<Icon.Clipboard className="w-4 h-auto" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
<Button className="!ml-6" variant="soft" color="warning" onClick={handleResetOpenIdBtnClick}>
|
||||
Reset
|
||||
</Button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{state.showChangePasswordDialog && (
|
||||
|
Reference in New Issue
Block a user