-
Couldn't load subscription status.
- Fork 1.1k
Add links to digested emails #842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
7872e2c
59265c5
67de9f8
2d8954e
cbcaefa
92c6b13
558880d
f895c0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,22 +20,17 @@ import { isGoogleProvider } from "@/utils/email/provider-types"; | |
| import { useRuleDialog } from "@/app/(app)/[emailAccountId]/assistant/RuleDialog"; | ||
|
|
||
| export function EmailCell({ | ||
| from, | ||
| subject, | ||
| snippet, | ||
| threadId, | ||
| messageId, | ||
| message, | ||
| userEmail, | ||
| createdAt, | ||
| }: { | ||
| from: string; | ||
| subject: string; | ||
| snippet: string; | ||
| threadId: string; | ||
| messageId: string; | ||
| message: ParsedMessage; | ||
| userEmail: string; | ||
| createdAt: Date; | ||
| }) { | ||
| const { id: messageId, threadId, headers, snippet } = message; | ||
| const from = headers?.from || ""; | ||
| const subject = headers?.subject || ""; | ||
| return ( | ||
| <div className="flex flex-1 flex-col justify-center"> | ||
| <div className="flex items-center justify-between"> | ||
|
|
@@ -44,11 +39,7 @@ export function EmailCell({ | |
| </div> | ||
| <div className="mt-1 flex items-center font-medium"> | ||
| <span>{subject}</span> | ||
| <OpenInGmailButton | ||
| messageId={messageId} | ||
| threadId={threadId} | ||
| userEmail={userEmail} | ||
| /> | ||
| <OpenInGmailButton message={message} userEmail={userEmail} /> | ||
| <ViewEmailButton | ||
| threadId={threadId} | ||
| messageId={messageId} | ||
|
|
@@ -170,12 +161,10 @@ export function DateCell({ createdAt }: { createdAt: Date }) { | |
| } | ||
|
|
||
| function OpenInGmailButton({ | ||
| messageId, | ||
| threadId, | ||
| message, | ||
| userEmail, | ||
| }: { | ||
| messageId: string; | ||
| threadId: string; | ||
| message: ParsedMessage; | ||
| userEmail: string; | ||
| }) { | ||
| const { provider } = useAccount(); | ||
|
|
@@ -186,7 +175,7 @@ function OpenInGmailButton({ | |
|
|
||
| return ( | ||
| <Link | ||
| href={getEmailUrlForMessage(messageId, threadId, userEmail, provider)} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Modified this function signature to pass the entire message instead of just messageId and threadId. |
||
| href={getEmailUrlForMessage(message, provider, userEmail)} | ||
| target="_blank" | ||
| className="ml-2 text-muted-foreground hover:text-foreground" | ||
| > | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.