Skip to content

Commit

Permalink
feat: spell checks and modifedtion
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashivadan committed Nov 9, 2024
1 parent 91e49df commit cfed7c5
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/app/(main)/products/[id]/(indox)/all/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -70,11 +70,11 @@ export default async function page({ params }: { params: { id: string } }) {
) : (
<>
<div className="columns-1 lg:columns-2">
{data.testimonials.map((testmonials) => (
{data.testimonials.map((Testimonials) => (
<>
{" "}
<div className="mb-2">
<TestimonialCard data={testmonials} />
<TestimonialCard data={Testimonials} />
</div>
</>
))}
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/app/(main)/products/[id]/(indox)/likes/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -30,10 +30,10 @@ export default async function Page({ params }: { params: { id: string } }) {
) : (
<>
<div className="columns-1 md:columns-2">
{data.testimonials.map((testmonials) => (
{data.testimonials.map((Testimonials) => (
<div className="mb-2">
{" "}
<TestimonialCard data={testmonials} />
<TestimonialCard data={Testimonials} />
</div>
))}
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/app/(main)/products/[id]/(indox)/text/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,10 +28,10 @@ export default async function Page({ params }: { params: { id: string } }) {
) : (
<>
<div className="columns-1 md:columns-2">
{data.testimonials.map((testmonials) => (
{data.testimonials.map((Testimonials) => (
<div className="mb-2">
{" "}
<TestimonialCard data={testmonials} />
<TestimonialCard data={Testimonials} />
</div>
))}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -107,7 +107,7 @@ export default function TestmonialAccordion({
<Button variant="outline" size="sm" className="rounded-sm">
Edit <Edit size={16} className="ml-2" />
</Button>
<ShareTestmonial data={data} />
<ShareTestimonial data={data} />

<Button
onClick={handleDownload}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import type { TestimonialType } from "~/types";
import { formatDate } from "~/utils/format-date";
import LikeButton from "./like-button";
import { RatingStar } from "./rating-star";
import TestmonialAccordion from "./testmonial-accordion";
import TestmonialDialog from "./testmonial-dialog";
import TestimonialAccordion from "./testimonial-accordion";
import TestimonialDialog from "./testimonial-dialog";

export default function TestimonialCard({ data }: { data: TestimonialType }) {
return (
Expand All @@ -34,9 +34,9 @@ export default function TestimonialCard({ data }: { data: TestimonialType }) {
</div>
</div>
<div className="space-y-2">
<TestmonialDialog data={data}>
<TestimonialDialog data={data}>
<p className="text-start text-sm italic">{data.message}</p>
</TestmonialDialog>
</TestimonialDialog>
<div
className={`flex items-center ${
data.wallOfFame ? "justify-between" : "justify-end"
Expand All @@ -52,7 +52,7 @@ export default function TestimonialCard({ data }: { data: TestimonialType }) {
)}
<p className="text-xs">{formatDate(data.createdAt)}</p>
</div>
<TestmonialAccordion data={data} />
<TestimonialAccordion data={data} />
</div>
</CardContent>
</Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}: {
Expand Down

0 comments on commit cfed7c5

Please sign in to comment.