Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
sidiDev committed Dec 19, 2023
1 parent 22b91ad commit 39db090
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions app/tools-test/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import ToolCardEffect from '@/components/ui/ToolCardEffect/ToolCardEffect';
import Page404 from '@/components/ui/Page404/Page404';
import { Product } from '@/utils/supabase/types';
import { createServerClient } from '@/utils/supabase/server';
import ToolCardList from '@/components/ui/ToolCardList';
import Logo from '@/components/ui/ToolCard/Tool.Logo';
import Name from '@/components/ui/ToolCard/Tool.Name';
import Tags from '@/components/ui/ToolCard/Tool.Tags';
import Title from '@/components/ui/ToolCard/Tool.Title';
import Votes from '@/components/ui/ToolCard/Tool.Votes';
import ToolCard from '@/components/ui/ToolCard/ToolCard';

const getOriginalSlug = (slug: string) => {
const getValidSlug = categories.filter(item => slug.replaceAll('-', ' ') == item.name.toLowerCase());
Expand Down Expand Up @@ -63,7 +68,21 @@ export default async ({ params: { slug } }: { params: { slug: string } }) => {
<h1 className="text-xl text-slate-50 font-extrabold">Best {getOriginalSlug(slug)} tools</h1>
<ul className="mt-10 mb-12 divide-y divide-slate-800/60">
{products.map((product: Product, idx: number) => (
<ToolCardList key={idx} tool={product as any} />
<li className="py-3">
<ToolCard tool={product} href={`/tool/${product.slug}`}>
<Logo src={product.logo_url || ''} alt={product.name} />
<div className="space-y-1">
<Name href={product.demo_url as string}>{product.name}</Name>
<Title className="line-clamp-2">{product.slogan}</Title>
<Tags
items={[
(product.product_pricing_types as { title: string }).title || 'Free',
...(product.product_categories as { name: string }[]).map((c: { name: string }) => c.name),
]}
/>
</div>
</ToolCard>
</li>
))}
</ul>
</>
Expand Down

0 comments on commit 39db090

Please sign in to comment.