Skip to content

Commit

Permalink
fix ui
Browse files Browse the repository at this point in the history
  • Loading branch information
KMKoushik committed Oct 29, 2024
1 parent b7569f2 commit 4838657
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions apps/web/src/app/(dashboard)/emails/email-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ import {
DELIVERY_DELAY_ERRORS,
} from "~/lib/constants/ses-errors";
import CancelEmail from "./cancel-email";
import { useQueryClient } from "@tanstack/react-query";
import { useEffect } from "react";
import { useState } from "react";

export default function EmailDetails({ emailId }: { emailId: string }) {
const queryClient = useQueryClient();

const emailQuery = api.email.getEmail.useQuery({ id: emailId });

return (
Expand Down Expand Up @@ -87,15 +84,14 @@ export default function EmailDetails({ emailId }: { emailId: string }) {
</div>
</>
) : null}
{emailQuery.data?.html ? (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.2, delay: 0.3 }}
>
<EmailPreview html={emailQuery.data?.html ?? ""} />
</motion.div>
) : null}

<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.2, delay: 0.3 }}
>
<EmailPreview html={emailQuery.data?.html ?? ""} />
</motion.div>
</div>
{emailQuery.data?.latestStatus !== "SCHEDULED" ? (
<div className=" border rounded-lg w-full shadow mb-2 ">
Expand Down

0 comments on commit 4838657

Please sign in to comment.