Skip to content

Commit

Permalink
Merge pull request #159 from Kashyap1ankit/feat/san-29
Browse files Browse the repository at this point in the history
added the resend contact email & fixed lint
  • Loading branch information
dinxsh authored Dec 22, 2024
2 parents 894ec60 + 9f52e9d commit 10d22dc
Show file tree
Hide file tree
Showing 30 changed files with 14,907 additions and 3,162 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
11 changes: 3 additions & 8 deletions @/components/ui/alert.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import * as React from "react"
export function Alert({
children,
className,
variant,
...props
}) {
import * as React from "react";
export function Alert({ children, className, variant, ...props }) {
return (
<div
className={`${className} rounded-lg border p-4 ${
Expand Down Expand Up @@ -45,4 +40,4 @@ export function AlertDescription({ children, className, ...props }) {
);
}

AlertDescription.displayName = "AlertDescription";
AlertDescription.displayName = "AlertDescription";
103 changes: 0 additions & 103 deletions @/components/ui/toast.jsx

This file was deleted.

35 changes: 0 additions & 35 deletions @/components/ui/toaster.jsx

This file was deleted.

155 changes: 0 additions & 155 deletions @/components/ui/use-toast.js

This file was deleted.

26 changes: 26 additions & 0 deletions app/action/sendContactEmail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"use server";
import { resend } from "../../lib/resend";
import ContactEmailTemplate from "../../components/Contatct/Contatc-email-format";

export async function sendContactEmail(username, fromEmail, message, subject) {
try {
const res = await resend.emails.send({
from: "Acme <[email protected]>",
to: "[email protected]",
subject: subject,
html: ContactEmailTemplate({ username, message, fromEmail }),
});

if (!res.data) throw new Error(res.error.name);

return {
status: 200,
message: "Sent successfully",
};
} catch (error) {
return {
status: 400,
message: error.message,
};
}
}
Loading

0 comments on commit 10d22dc

Please sign in to comment.