diff --git a/README.md b/README.md index 518412d3..568dc7e2 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,16 @@ -[![Watch tutorial here](https://img.youtube.com/vi/sUKptmUVIBM/0.jpg)](https://youtu.be/sUKptmUVIBM) -# [Watch video here](https://youtu.be/sUKptmUVIBM) - -## What you will learn - -- Latest Next.js 13 features -- Next.js App Router -- Next.js Server Actions -- Client & Server Components -- TypeScript (Beginner & Intermediate) -- Tailwind CSS -- Context API -- Advanced Animations with Framer Motion -- React.Email & Resend -- Custom React hooks -- Fresh, modern UI design -- Light & Dark mode -- Responsive website +# My portfolio!! +## Made using +- React & Next.js, +- TypeScript, +- Tailwind CSS, +- Framer Motion, +- React Email & Resend, +- Vercel hosting ## Important -If you want to be a professional developer, you have to know the fundamentals like JavaScript and CSS really well. I highly recommend you go through my [Professional JavaScript](https://bytegrad.com/courses/professional-javascript) and [Professional CSS](https://bytegrad.com/courses/professional-css) courses. - -I'm close to releasing a complete React & Next.js course. Get on the email list to receive early-bird pricing: [link](https://email.bytegrad.com/). - ## Setup -1. Add RESEND_API_KEY environment variable in .env.local -2. In the send-email.ts action file, change the "to" email to your own email +1. Add your own RESEND_API_KEY environment variable in .env.local +2. In the send-email.this shi file, change the "to" email to your own diff --git a/actions/sendEmail.ts b/actions/sendEmail.ts index 047508da..5ddcbf11 100644 --- a/actions/sendEmail.ts +++ b/actions/sendEmail.ts @@ -3,45 +3,43 @@ import React from "react"; import { Resend } from "resend"; import { validateString, getErrorMessage } from "@/lib/utils"; -import ContactFormEmail from "@/email/contact-form-email"; +import ContactFormEmail from "@/email/contact-form-email" const resend = new Resend(process.env.RESEND_API_KEY); export const sendEmail = async (formData: FormData) => { - const senderEmail = formData.get("senderEmail"); - const message = formData.get("message"); + const senderEmail = formData.get('senderEmail'); + const message = formData.get('message'); - // simple server-side validation - if (!validateString(senderEmail, 500)) { - return { - error: "Invalid sender email", - }; - } - if (!validateString(message, 5000)) { - return { - error: "Invalid message", - }; - } + if(!validateString(senderEmail, 500)) { + return { + error: "Invalid email" + } + } + if(!validateString(message, 5000)) { + return { + error: "Invalid message" + } + } - let data; - try { - data = await resend.emails.send({ - from: "Contact Form ", - to: "bytegrad@gmail.com", - subject: "Message from contact form", - reply_to: senderEmail, - react: React.createElement(ContactFormEmail, { - message: message, - senderEmail: senderEmail, - }), - }); - } catch (error: unknown) { - return { - error: getErrorMessage(error), - }; - } - - return { - data, - }; -}; + let data; + try { + await resend.emails.send({ + from: 'Contact Form ', + to: 'maheerj914@gmail.com', + subject: 'Important', + reply_to: senderEmail as string, + react: React.createElement(ContactFormEmail, { + message: message as string, + senderEmail: senderEmail as string + }) + }); + } catch (error: unknown) { + return { + error: getErrorMessage(error), + }; + } + return { + data, + }; + }; \ No newline at end of file diff --git a/app/favicon.ico b/app/favicon.ico index f155228d..be45716b 100644 Binary files a/app/favicon.ico and b/app/favicon.ico differ diff --git a/app/layout.tsx b/app/layout.tsx index 38cb5595..71dddc07 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,43 +1,42 @@ -import Header from "@/components/header"; -import "./globals.css"; -import { Inter } from "next/font/google"; -import ActiveSectionContextProvider from "@/context/active-section-context"; -import Footer from "@/components/footer"; -import ThemeSwitch from "@/components/theme-switch"; -import ThemeContextProvider from "@/context/theme-context"; +import Footer from '@/components/footer'; +import './globals.css' +import Header from "@/components/header" +import ActiveSectionContextProvider from '@/context/active-section-context'; +import { Inter } from 'next/font/google' import { Toaster } from "react-hot-toast"; +import ThemeSwitch from '@/components/theme-switch'; +import ThemeContextProvider from '@/context/theme-context'; -const inter = Inter({ subsets: ["latin"] }); +const inter = Inter({ subsets: ['latin'] }) export const metadata = { - title: "Ricardo | Personal Portfolio", - description: "Ricardo is a full-stack developer with 8 years of experience.", + title: 'Maheer | Software Developer Portfolio', + description: "I'm Maheer, a software developer with over 3 years of experience in full-stack development", }; export default function RootLayout({ children, }: { - children: React.ReactNode; + children: React.ReactNode }) { return ( - - -
-
- - - -
- {children} -