update kanban styling, add more detailed error log for gmail
This commit is contained in:
@@ -236,8 +236,12 @@ export default function Correspondence({ jobId }: { jobId: number }) {
|
||||
});
|
||||
await load();
|
||||
toast("Email imported from Gmail.", "success");
|
||||
} catch {
|
||||
toast("Failed to import Gmail message.", "error");
|
||||
} catch (error: any) {
|
||||
const message =
|
||||
error?.response?.data && typeof error.response.data === "string"
|
||||
? error.response.data
|
||||
: "Failed to import Gmail message.";
|
||||
toast(message, "error");
|
||||
} finally {
|
||||
setImportingMessageId(null);
|
||||
}
|
||||
@@ -303,8 +307,8 @@ export default function Correspondence({ jobId }: { jobId: number }) {
|
||||
sx={{ display: "block", mt: 0.75, color: "text.secondary" }}
|
||||
>
|
||||
{isMe ? "Me" : "Company"}
|
||||
{m.channel ? ` · ${m.channel}` : ""}
|
||||
{m.date ? ` · ${new Date(m.date).toLocaleString()}` : ""}
|
||||
{m.channel ? ` · ${m.channel}` : ""}
|
||||
{m.date ? ` · ${new Date(m.date).toLocaleString()}` : ""}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user