Skip to content

Commit

Permalink
Revert bug
Browse files Browse the repository at this point in the history
Revert "Feat/add safeswap landing page"
  • Loading branch information
danielcdz authored Nov 24, 2024
2 parents 933b9f5 + beda0c6 commit 95e92cc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 244 deletions.
6 changes: 1 addition & 5 deletions frontend/app/components/ui/hero-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ export function HeroSection() {
</div>

<h1 className="text-4xl sm:text-6xl font-bold tracking-tight mb-8 bg-clip-text from-primary to-primary/70">
SafeSwap
</h1>
<h3 className="text-2xl sm:text-3xl font-semibold tracking-tight mb-6 bg-clip-text from-primary to-primary/70">
The Future of Secure Trading
</h3>
The Future of
<span className="block mt-2">Secure Trading</span>
</h1>

<p className="text-xl text-muted-foreground max-w-[600px] mb-12">
Experience trustless trading with built-in Stellar escrow protection.
Your gateway to secure, decentralized commerce.
Expand Down
22 changes: 0 additions & 22 deletions frontend/app/components/ui/input.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@

import { cn } from "@/lib/utils";
import * as React from "react";

const Input = React.forwardRef<
HTMLInputElement,
React.InputHTMLAttributes<HTMLInputElement>
>(({ className, type, ...props }, ref) => {
return (
<input
type={type}
className={cn(
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
ref={ref}
{...props}
/>
);
});
Input.displayName = "Input";

import * as React from "react";

import { cn } from "@/lib/utils";
Expand Down
217 changes: 0 additions & 217 deletions frontend/app/marketplace/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,8 @@ import {
SidebarTrigger,
} from "@/app/components/ui/sidebar";
import { Slider } from "@/app/components/ui/slider";

import { Menu as HamIcon, Search } from "lucide-react";
import { Dispatch, SetStateAction, useState } from "react";

interface Product {
id: number;

import ImageCarousel from "../components/ui/image-carrousel";
import { usePathname, useRouter } from "next/navigation";

import {
Menu as HamIcon,
MessageSquareMore,
Expand Down Expand Up @@ -62,89 +54,6 @@ interface ProductListProps {
}

const products: Product[] = [

{ id: 1, name: "Laptop Pro", price: 1299, category: "Electronics" },
{ id: 2, name: "Smartphone X", price: 699, category: "Electronics" },
{ id: 3, name: "Ergonomic Chair", price: 299, category: "Furniture" },
{ id: 4, name: "Coffee Maker", price: 89, category: "Appliances" },
{ id: 5, name: "Running Shoes", price: 129, category: "Sports" },
{ id: 6, name: "Wireless Earbuds", price: 159, category: "Electronics" },
{
id: 1,
name: "MacBook Pro 14",
price: 1299,
category: "Electronics",
images: [
{ src: "/images/macbook-pro-14.webp", alt: "MacBook Pro 14" },
{ src: "/images/macbook-pro-14.webp", alt: "MacBook Pro 14" },
{ src: "/images/macbook-pro-14.webp", alt: "MacBook Pro 14" },
],
},
{
id: 2,
name: "Samsung Galaxy S24 FE",
price: 699,
category: "Electronics",
images: [
{
src: "/images/samsung-galaxy-s24-fe.webp",
alt: "Samsung Galaxy S24 FE",
},
{
src: "/images/samsung-galaxy-s24-fe.webp",
alt: "Samsung Galaxy S24 FE",
},
{
src: "/images/samsung-galaxy-s24-fe.webp",
alt: "Samsung Galaxy S24 FE",
},
],
},
{
id: 3,
name: "Ergonomic Chair",
price: 299,
category: "Furniture",
images: [
{ src: "/images/ergonomic-chair.jpg", alt: "Ergonomic Chair" },
{ src: "/images/ergonomic-chair.jpg", alt: "Ergonomic Chair" },
{ src: "/images/ergonomic-chair.jpg", alt: "Ergonomic Chair" },
],
},
{
id: 4,
name: "Coffee Maker",
price: 89,
category: "Appliances",
images: [
{ src: "/images/coffee-maker.webp", alt: "Coffee Maker" },
{ src: "/images/coffee-maker.webp", alt: "Coffee Maker" },
{ src: "/images/coffee-maker.webp", alt: "Coffee Maker" },
],
},
{
id: 5,
name: "Running Shoes",
price: 129,
category: "Sports",
images: [
{ src: "/images/running-shoes.jpg", alt: "Running Shoes" },
{ src: "/images/running-shoes.jpg", alt: "Running Shoes" },
{ src: "/images/running-shoes.jpg", alt: "Running Shoes" },
],
},
{
id: 6,
name: "Wireless Earbuds",
price: 159,
category: "Electronics",
images: [
{ src: "/images/wireless-earbuds.jpg", alt: "Wireless Earbuds" },
{ src: "/images/wireless-earbuds.jpg", alt: "Wireless Earbuds" },
{ src: "/images/wireless-earbuds.jpg", alt: "Wireless Earbuds" },
],
},
=======
{
id: 1,
name: "MacBook Pro 14",
Expand Down Expand Up @@ -272,132 +181,6 @@ function SidebarComponent({
selectedCategories,
handleCategoryChange,
}: SidebarComponentProps) {

const handleSliderChange = (value: number[]) => {
if (value.length === 2) {
setPriceRange([value[0], value[1]]);
}
};
return (
<Sidebar>
<SidebarHeader className="p-6 border-b">
<h2 className="text-xl font-semibold">Filters</h2>
</SidebarHeader>
<SidebarContent className="p-6">
<div className="space-y-8">
<div>
<h3 className="mb-2 text-lg font-medium">Price range</h3>
<Slider
min={0}
max={1500}
step={10}
value={priceRange}
onValueChange={handleSliderChange}
onValueChange={(value) =>
setPriceRange(value as [number, number])
}
className="mb-3"
/>
<div className="flex justify-between text-lg">
<span>${priceRange[0]}</span>
<span>${priceRange[1]}</span>
</div>
</div>
<div>
<h3 className="mb-2 text-lg font-medium">Categories</h3>
<div className="space-y-3">
{["Electronics", "Furniture", "Appliances", "Sports"].map(
(category) => (
<div key={category} className="flex items-center">
<Checkbox
id={category}
checked={selectedCategories.includes(category)}
onCheckedChange={() => handleCategoryChange(category)}
/>
<label htmlFor={category} className="ml-3 text-lg">
{category}
</label>
</div>
),
)}
</div>
</div>
</div>
</SidebarContent>
</Sidebar>
);
}

function HeaderComponent({ searchTerm, setSearchTerm }: HeaderComponentProps) {
return (
<header className="flex items-center justify-between p-6 border-b">
<SidebarTrigger>
<Button variant="outline" size="icon">
<HamIcon className="h-6 w-6" />
<span className="sr-only">Toggle Sidebar</span>
</Button>
</SidebarTrigger>
<div className="flex items-center text-2xl space-x-3">
<div className="flex items-center text-2xl space-x-3 w-full md:w-auto">
<Input
type="search"
placeholder="Search products..."
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
className="w-[16rem] h-[3rem]"
className="w-full h-[3rem] md:w-[16rem]"
/>
<Button size="icon" variant="ghost">
<Search className="h-5 w-5" />
<span className="sr-only">Search</span>
</Button>
</div>
</header>
);
}

function ProductList({ products }: ProductListProps) {
return (
<main className="p-8">
<h1 className="text-3xl font-bold mb-8">Products</h1>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{products?.map((product) => (
<Card key={product.id} className="p-6">
<CardHeader>
<CardTitle className="text-xl font-semibold">
<div className="flex flex-wrap justify-center gap-8">
{products?.map((product) => (
<Card key={product.id}>
<CardHeader>
<ImageCarousel images={product.images} />
<CardTitle className="text-xl font-medium">
{product.name}
</CardTitle>
</CardHeader>
<CardContent>
<p className="text-lg text-gray-500">{product.category}</p>
</CardContent>
<CardFooter className="flex justify-between items-center">
<span className="text-2xl font-bold">${product.price}</span>
<Button className="text-[16px] py-2 px-4">Add to Cart</Button>
<CardFooter className="flex justify-between gap-2 items-center flex-wrap">
<span className="text-3xl font-bold">${product.price}</span>
<div className="flex flex-col m-auto">
<Button className="mb-4">
<ShoppingCart className="mr-2 h-4 w-4 transition-transform group-hover:translate-x-1" />
Add to Cart
</Button>
<Button className="text-[16px] !bg-[#F5F5F5] !text-black border border-[#D1D1D1] px-4 py-2 flex items-center gap-2 hover:bg-[#E0E0E0] hover:border-[#B3B3B3]">
<MessageSquareMore /> Chat with Seller
</Button>
</div>
</CardFooter>
</Card>
))}
</div>
</main>
);

return (
<Sidebar>
<SidebarHeader className="p-6 border-b">
Expand Down

0 comments on commit 95e92cc

Please sign in to comment.