Skip to content
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

Enhanced Feedback form #245

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/app/assets/feedback.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 19 additions & 9 deletions src/components/shared/customerreviews.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"use client";
import * as React from "react";
import Image from 'next/image';
import * as z from "zod";
import { useForm } from "react-hook-form";
import feedbackImage from '../../../src/app/assets/feedback.png' ;
import { zodResolver } from "@hookform/resolvers/zod";
import {
Form,
Expand Down Expand Up @@ -82,19 +84,24 @@ export default function Review() {
</p>
<ReviewCarousel items={testimonials2} direction="left" speed="slow" />
</div>
<div className="flex w-full text-2xl flex-col items-center p-10 md:text-sm">
<p className="text-xl md:text-2xl py-5 opacity-75">
<p className=" text-4xl md:text-6xl font-bold mb-5 bg-gradient-to-b from-zinc-100 via-orange-400 to-orange-500 bg-clip-text text-transparent text-center mt-4">
Loved our product?
</p>
<p className="text-3xl md:text-5xl font-bold py-2 bg-gradient-to-r bg-clip-text text-transparent from-muted-foreground via-primary-foreground to-muted-foreground">
<div className="flex shadow-lg md:relative md:right-[40px] dark:shadow-white shadow-black w-[80vw] flex-col items-center justify-center lg:w-[80vw] md:w[80vw] gap-6 mx-auto mb-6 pt-10 pb-6 bg-opacity-8 px-4 rounded-lg dark:bg-black dark:border-white bg-white border border-secondary">

<p className="text-center color-black dark:color-white text-3xl md:text-5xl font-bold py-2 bg-gradient-to-r bg-clip-text text-transparent from-muted-foreground via-primary-foreground to-muted-foreground">
Leave a Review 👇
</p>
</div>
<div className="w-full max-w-lg p-4 md:p-10">
<div className="flex md:flex-row flex-col gap-0 w-[100%]">
<div className="w-[100%] md:w-[50%] flex justify-center items-center">

<Image src={feedbackImage} width={500} height={700} alt="No"/>
</div>
<div className="w-[100%] md:w-[50%] flex justify-center items-center max-w-lg p-4 md:p-10">
<Form {...form}>
<form
onSubmit={form.handleSubmit(handleSubmit)}
className="flex flex-col gap-8"
className="flex flex-col gap-8 w-[80%]"
>
<FormField
control={form.control}
Expand All @@ -106,6 +113,7 @@ export default function Review() {
<FormControl>
<Input
placeholder="Manav Malhotra"
className="flex h-10 rounded-none w-full border-b-black dark:border-b-white placeholder:text-muted-foreground px-3 py-2 text-sm shadow-inner bg-[transparent] focus:outline-none outline-none "
type="text"
{...field}
/>
Expand All @@ -125,8 +133,9 @@ export default function Review() {
<FormLabel>Email Address</FormLabel>
<FormControl>
<Input
placeholder="[email protected]"
className="flex h-10 rounded-none w-full border-b-black dark:border-b-white placeholder:text-muted-foreground px-3 py-2 text-sm shadow-inner bg-[transparent] focus:outline-none outline-none "
type="email"
placeholder="[email protected]"
{...field}
/>
</FormControl>
Expand All @@ -135,7 +144,6 @@ export default function Review() {
);
}}
/>

<FormField
control={form.control}
name="feedback"
Expand All @@ -146,7 +154,7 @@ export default function Review() {
<FormControl>
<Textarea
placeholder="Tell us what you loved about our product"
className="resize-none"
className="resize-none flex h-10 rounded-none w-full border-b-black dark:border-b-white placeholder:text-muted-foreground px-3 py-2 text-sm shadow-inner bg-[transparent] focus:outline-none outline-none "
{...field}
/>
</FormControl>
Expand All @@ -161,6 +169,8 @@ export default function Review() {
</form>
</Form>
</div>
</div>
</div>
</main>
);
}