From cfed7c5cf9d7115f21fb456c44dfd4c3107087e0 Mon Sep 17 00:00:00 2001 From: Shashivadan Date: Sun, 10 Nov 2024 02:30:21 +0530 Subject: [PATCH] feat: spell checks and modifedtion --- ...{delete-testmonial.tsx => delete-testimonial.tsx} | 2 +- .../app/(main)/products/[id]/(indox)/all/page.tsx | 6 +++--- .../app/(main)/products/[id]/(indox)/likes/page.tsx | 6 +++--- .../app/(main)/products/[id]/(indox)/text/page.tsx | 6 +++--- .../{testmoial => testimonial}/like-button.tsx | 0 .../{testmoial => testimonial}/rating-star.tsx | 0 .../share-testimonial.tsx} | 2 +- .../testimonial-accordion.tsx} | 12 ++++++------ .../testimonial-card.tsx} | 10 +++++----- .../testimonial-dialog.tsx} | 2 +- ...testmonial-card.ts => create-testimonial-card.ts} | 0 11 files changed, 23 insertions(+), 23 deletions(-) rename apps/www/src/actions/{delete-testmonial.tsx => delete-testimonial.tsx} (96%) rename apps/www/src/components/{testmoial => testimonial}/like-button.tsx (100%) rename apps/www/src/components/{testmoial => testimonial}/rating-star.tsx (100%) rename apps/www/src/components/{testmoial/share-testmonial.tsx => testimonial/share-testimonial.tsx} (96%) rename apps/www/src/components/{testmoial/testmonial-accordion.tsx => testimonial/testimonial-accordion.tsx} (92%) rename apps/www/src/components/{testmoial/testmonial-card.tsx => testimonial/testimonial-card.tsx} (87%) rename apps/www/src/components/{testmoial/testmonial-dialog.tsx => testimonial/testimonial-dialog.tsx} (98%) rename apps/www/src/utils/{create-testmonial-card.ts => create-testimonial-card.ts} (100%) diff --git a/apps/www/src/actions/delete-testmonial.tsx b/apps/www/src/actions/delete-testimonial.tsx similarity index 96% rename from apps/www/src/actions/delete-testmonial.tsx rename to apps/www/src/actions/delete-testimonial.tsx index 2ccc02f..7c62f0d 100644 --- a/apps/www/src/actions/delete-testmonial.tsx +++ b/apps/www/src/actions/delete-testimonial.tsx @@ -8,7 +8,7 @@ import { organizationTable, testimonialTable } from "@acme/db/schema"; import { getCurrentUser } from "~/utils/get-current-user"; -export async function deleteTestmonial(id: string) { +export async function deleteTestimonial(id: string) { const user = await getCurrentUser(); if (!user) { diff --git a/apps/www/src/app/(main)/products/[id]/(indox)/all/page.tsx b/apps/www/src/app/(main)/products/[id]/(indox)/all/page.tsx index e3b4409..191bf6d 100644 --- a/apps/www/src/app/(main)/products/[id]/(indox)/all/page.tsx +++ b/apps/www/src/app/(main)/products/[id]/(indox)/all/page.tsx @@ -7,7 +7,7 @@ import { Card, CardContent, CardHeader, CardTitle } from "@acme/ui/card"; import { getSpaceTestimonialsDetails } from "~/actions/get-space-testimonials-details"; import NotFound from "~/components/404-not-found"; import NothingHere from "~/components/nothing-here"; -import TestimonialCard from "~/components/testmoial/testmonial-card"; +import TestimonialCard from "~/components/testimonial/testimonial-card"; import { formatDate } from "~/utils/format-date"; import { getCurrentUser } from "~/utils/get-current-user"; @@ -70,11 +70,11 @@ export default async function page({ params }: { params: { id: string } }) { ) : ( <>
- {data.testimonials.map((testmonials) => ( + {data.testimonials.map((Testimonials) => ( <> {" "}
- +
))} diff --git a/apps/www/src/app/(main)/products/[id]/(indox)/likes/page.tsx b/apps/www/src/app/(main)/products/[id]/(indox)/likes/page.tsx index 9a4118f..f01f5ce 100644 --- a/apps/www/src/app/(main)/products/[id]/(indox)/likes/page.tsx +++ b/apps/www/src/app/(main)/products/[id]/(indox)/likes/page.tsx @@ -5,7 +5,7 @@ import { Card } from "@acme/ui/card"; import { getTestimonialsLikedDetails } from "~/actions/get-space-testimonials-details"; import NotFound from "~/components/404-not-found"; import NothingHere from "~/components/nothing-here"; -import TestimonialCard from "~/components/testmoial/testmonial-card"; +import TestimonialCard from "~/components/testimonial/testimonial-card"; export default async function Page({ params }: { params: { id: string } }) { const id: string = params.id; @@ -30,10 +30,10 @@ export default async function Page({ params }: { params: { id: string } }) { ) : ( <>
- {data.testimonials.map((testmonials) => ( + {data.testimonials.map((Testimonials) => (
{" "} - +
))}
diff --git a/apps/www/src/app/(main)/products/[id]/(indox)/text/page.tsx b/apps/www/src/app/(main)/products/[id]/(indox)/text/page.tsx index e100b39..788e122 100644 --- a/apps/www/src/app/(main)/products/[id]/(indox)/text/page.tsx +++ b/apps/www/src/app/(main)/products/[id]/(indox)/text/page.tsx @@ -5,7 +5,7 @@ import { Card } from "@acme/ui/card"; import { getTestimonialsWithTextOnlyDetails } from "~/actions/get-space-testimonials-details"; import NotFound from "~/components/404-not-found"; import NothingHere from "~/components/nothing-here"; -import TestimonialCard from "~/components/testmoial/testmonial-card"; +import TestimonialCard from "~/components/testimonial/testimonial-card"; export default async function Page({ params }: { params: { id: string } }) { const id: string = params.id; @@ -28,10 +28,10 @@ export default async function Page({ params }: { params: { id: string } }) { ) : ( <>
- {data.testimonials.map((testmonials) => ( + {data.testimonials.map((Testimonials) => (
{" "} - +
))}
diff --git a/apps/www/src/components/testmoial/like-button.tsx b/apps/www/src/components/testimonial/like-button.tsx similarity index 100% rename from apps/www/src/components/testmoial/like-button.tsx rename to apps/www/src/components/testimonial/like-button.tsx diff --git a/apps/www/src/components/testmoial/rating-star.tsx b/apps/www/src/components/testimonial/rating-star.tsx similarity index 100% rename from apps/www/src/components/testmoial/rating-star.tsx rename to apps/www/src/components/testimonial/rating-star.tsx diff --git a/apps/www/src/components/testmoial/share-testmonial.tsx b/apps/www/src/components/testimonial/share-testimonial.tsx similarity index 96% rename from apps/www/src/components/testmoial/share-testmonial.tsx rename to apps/www/src/components/testimonial/share-testimonial.tsx index 845e0ee..cd623ae 100644 --- a/apps/www/src/components/testmoial/share-testmonial.tsx +++ b/apps/www/src/components/testimonial/share-testimonial.tsx @@ -12,7 +12,7 @@ import { import type { TestimonialType } from "~/types"; -export default function ShareTestmonial({ data }: { data: TestimonialType }) { +export default function ShareTestimonial({ data }: { data: TestimonialType }) { const domain = document.location.origin; const twitterShareUrl = `https://twitter.com/intent/tweet?url=${encodeURIComponent(`${domain}/share/${data.id}`)}&text=${encodeURIComponent("Check out these amazing customer testimonial! 🌟")}`; const linkedinShareUrl = `https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(`${domain}/share/${data.id}`)}&title=${encodeURIComponent("Real stories from real users ⭐️ See what everyone's saying about us!")}&summary=${encodeURIComponent("Check out these amazing customer testimonial! 🌟")}&source=${encodeURIComponent(`${domain}/share/${data.id}`)}`; diff --git a/apps/www/src/components/testmoial/testmonial-accordion.tsx b/apps/www/src/components/testimonial/testimonial-accordion.tsx similarity index 92% rename from apps/www/src/components/testmoial/testmonial-accordion.tsx rename to apps/www/src/components/testimonial/testimonial-accordion.tsx index 5b53be9..14ea1b5 100644 --- a/apps/www/src/components/testmoial/testmonial-accordion.tsx +++ b/apps/www/src/components/testimonial/testimonial-accordion.tsx @@ -15,18 +15,18 @@ import { toast } from "@acme/ui/toast"; import type { TestimonialType } from "~/types"; import { addToArchive } from "~/actions/add-to-archive"; -import { deleteTestmonial } from "~/actions/delete-testmonial"; -import { createSocialCard } from "~/utils/create-testmonial-card"; -import ShareTestmonial from "./share-testmonial"; +import { deleteTestimonial } from "~/actions/delete-testimonial"; +import { createSocialCard } from "~/utils/create-testimonial-card"; +import ShareTestimonial from "./share-testimonial"; -export default function TestmonialAccordion({ +export default function TestimonialAccordion({ data, }: { data: TestimonialType; }) { const handleDelete = async () => { try { - await deleteTestmonial(data.id); + await deleteTestimonial(data.id); toast.success("Testimonial deleted successfully"); } catch (error) { toast.error((error as Error).message); @@ -107,7 +107,7 @@ export default function TestmonialAccordion({ - +
- +

{data.message}

-
+
{formatDate(data.createdAt)}

- +
diff --git a/apps/www/src/components/testmoial/testmonial-dialog.tsx b/apps/www/src/components/testimonial/testimonial-dialog.tsx similarity index 98% rename from apps/www/src/components/testmoial/testmonial-dialog.tsx rename to apps/www/src/components/testimonial/testimonial-dialog.tsx index 554705d..077857f 100644 --- a/apps/www/src/components/testmoial/testmonial-dialog.tsx +++ b/apps/www/src/components/testimonial/testimonial-dialog.tsx @@ -18,7 +18,7 @@ import type { TestimonialType } from "~/types"; import { formatDate } from "~/utils/format-date"; import { RatingStar } from "./rating-star"; -export default function TestmonialDialog({ +export default function TestimonialDialog({ children, data, }: { diff --git a/apps/www/src/utils/create-testmonial-card.ts b/apps/www/src/utils/create-testimonial-card.ts similarity index 100% rename from apps/www/src/utils/create-testmonial-card.ts rename to apps/www/src/utils/create-testimonial-card.ts