feat(email): consolidate correspondence routes
CI and Deploy / test (pull_request) Failing after 1m35s
CI and Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
cesnimda
2026-08-09 21:19:27 +02:00
parent efacc3a06b
commit 6008b4afef
4 changed files with 59 additions and 22 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import { CreatedSuggestedGmailJobResult, GmailManualSyncResult, GmailReviewQueue
import { useToast } from "../toast";
import { useNavigate } from "react-router-dom";
export default function GmailReviewPage() {
export default function GmailReviewPage({ embedded = false }: { embedded?: boolean }) {
const { toast } = useToast();
const navigate = useNavigate();
const [data, setData] = useState<GmailReviewQueueResponse | null>(null);
@@ -134,7 +134,7 @@ export default function GmailReviewPage() {
>
<Box sx={{ display: "flex", justifyContent: "space-between", gap: 2, alignItems: "center", flexWrap: "wrap", mb: 2 }}>
<Box>
<Typography variant="h5" sx={{ fontWeight: 900 }}>Gmail review queue</Typography>
<Typography component={embedded ? "h2" : "h1"} variant="h5" sx={{ fontWeight: 900 }}>{embedded ? "Recruitment message review" : "Gmail review queue"}</Typography>
<Typography variant="body2" sx={{ color: "text.secondary" }}>
Manual sync, high-confidence auto-linking, medium-confidence review, and suggested jobs from unmatched Gmail threads.
</Typography>
@@ -146,7 +146,7 @@ export default function GmailReviewPage() {
<Button variant="outlined" onClick={() => void load()} disabled={loading || syncing}>
{loading ? "Loading..." : "Refresh"}
</Button>
<Button variant="text" onClick={() => navigate("/correspondence")}>Back to inbox</Button>
{!embedded ? <Button variant="text" onClick={() => navigate("/correspondence")}>Back to inbox</Button> : null}
</Box>
</Box>