Skip to content

Commit

Permalink
pages ui update ...0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
salvadorcamino committed Oct 13, 2024
1 parent 78242d8 commit a70aa32
Show file tree
Hide file tree
Showing 30 changed files with 2,665 additions and 435 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"framer-motion": "^11.5.6",
"lucide-react": "^0.445.0",
"lucide-react": "^0.451.0",
"pinata-web3": "^0.5.0",
"postcss": "^8.4.38"
}
Expand Down
62 changes: 62 additions & 0 deletions packages/nextjs/app/categoriesMarketplace/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
"use client";

import type { NextPage } from "next";
import { useAccount } from "@starknet-react/core";
import { CustomConnectButton } from "~~/components/scaffold-stark/CustomConnectButton";
import { useScaffoldReadContract } from "~~/hooks/scaffold-stark/useScaffoldReadContract";
import { useScaffoldWriteContract } from "~~/hooks/scaffold-stark/useScaffoldWriteContract";
import { notification } from "~~/utils/scaffold-stark";
import { useState } from "react";

import Link from 'next/link'


const categoriesMarketplace: NextPage = () => {
const { address: connectedAddress, isConnected, isConnecting } = useAccount();

const categories = [
{ id: 1, name: "Software", count: 150 },
{ id: 2, name: "Design", count: 80 },
{ id: 3, name: "Biotech", count: 60 },
{ id: 4, name: "IoT", count: 45 },
{ id: 5, name: "Materials", count: 30 },
{ id: 6, name: "Cybersecurity", count: 55 },
{ id: 7, name: "Agriculture", count: 25 },
{ id: 8, name: "Energy", count: 40 },
]

return (
<>


<div className="min-h-screen py-12 px-4 sm:px-6 lg:px-8">

{!isConnected || isConnecting ? (
<CustomConnectButton />
) : (


<div>
<h1 className="text-4xl font-bold mb-8">Categories</h1>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{categories.map((category) => (
<Link key={category.id} href={`/marketplace?category=${category.name}`} className="block">
<div className="bg-base-100 shadow rounded-lg p-6 hover:shadow-lg transition-shadow">
<h2 className="text-2xl font-semibold mb-2">{category.name}</h2>
<p className="text">{category.count} listings</p>
</div>
</Link>
))}
</div>
</div>


)}


</div>
</>
);
};

export default categoriesMarketplace;
71 changes: 71 additions & 0 deletions packages/nextjs/app/collectionsIP/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
"use client";

import type { NextPage } from "next";
import { useAccount } from "@starknet-react/core";
import { CustomConnectButton } from "~~/components/scaffold-stark/CustomConnectButton";
import { useScaffoldReadContract } from "~~/hooks/scaffold-stark/useScaffoldReadContract";
import { useScaffoldWriteContract } from "~~/hooks/scaffold-stark/useScaffoldWriteContract";
import { notification } from "~~/utils/scaffold-stark";
import { useState } from "react";

import Image from 'next/image'
import Link from 'next/link'
import { ArrowLeft, Plus, LinkIcon, ArrowRight, DollarSign, Shield, Globe, Clock, File, Users, Activity } from 'lucide-react'





const collectionsIP: NextPage = () => {
const { address: connectedAddress, isConnected, isConnecting } = useAccount();


const collections = [
{ id: 1, name: "Movie Reviews", creator: "Author", items: 25, image: "/background.jpg" },
{ id: 2, name: "Fine Art Paintings", creator: "Stark", items: 18, image: "/background.jpg" },
{ id: 3, name: "Medical Breakthroughs", creator: "HealthTech", items: 30, image: "/background.jpg" },
{ id: 4, name: "Future of Transportation", creator: "Corp", items: 22, image: "/background.jpg" },
{ id: 5, name: "Music Releases", creator: "Author", items: 50, image: "/background.jpg" },
{ id: 6, name: "Art Colab", creator: "DAO", items: 22, image: "/background.jpg" },
]


return (
<>


<div className="min-h-screen py-12 px-4 sm:px-6 lg:px-8">

{!isConnected || isConnecting ? (
<CustomConnectButton />
) : (


<div>
<h1 className="text-4xl font-bold mb-8">Featured Collections</h1>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{collections.map((collection) => (
<Link key={collection.id} href={`/collections/${collection.id}`} className="block">
<div className="bg-base-100 rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-shadow">
<Image src={collection.image} alt={collection.name} width={400} height={200} className="w-full h-48 object-cover" />
<div className="p-4">
<h2 className="text-xl font-semibold mb-2">{collection.name}</h2>
<p className="text-gray-600 mb-2">By {collection.creator}</p>
<p className="text-blue-600">{collection.items} items</p>
</div>
</div>
</Link>
))}
</div>
</div>


)}


</div>
</>
);
};

export default collectionsIP;
45 changes: 1 addition & 44 deletions packages/nextjs/app/ipfsDownload/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,53 +56,10 @@ const IpfsDownload: NextPage = () => {

<div className="flex items-center flex-col flex-grow pt-10">
<h1 className="text-center mb-4">
<span className="block text-4xl font-bold">Licence your IP</span>
<span className="block text-4xl font-bold">Create new License from Metadata (IPFS)</span>
</h1>
</div>


<div className="flex items-center flex-col flex-grow pt-10">
<Card className="bg-main border-accent/50 rounded-full" >
<CardHeader>
<CardTitle>IP Licensing Form</CardTitle>
<CardDescription>Create a license for your registered intellectual property.</CardDescription>
</CardHeader>
<CardContent>
<form>
<div className="grid w-full items-center gap-4">
<div className="flex flex-col space-y-1.5">
<Select
options={ipOptions}
value={selectedIP}
onChange={(e) => setSelectedIP(e.target.value)}
/>
</div>
<div className="flex flex-col space-y-1.5">
<Input id="licensee" placeholder="Licensee Name" />
</div>
<div className="flex flex-col space-y-1.5">
<Textarea placeholder="License Terms" />
</div>
<div className="flex flex-col space-y-1.5">
<Input id="duration" placeholder="License Duration" />
</div>
<div className="flex flex-col space-y-1.5">
<Input id="fee" placeholder="License Fee" />
</div>
</div>
</form>
</CardContent>
<CardFooter className="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Create License</Button>
</CardFooter>
</Card>


</div>



<div className="flex items-center flex-col flex-grow pt-10">
<Card className="bg-main border-accent/50 rounded-full" >
<CardHeader>
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/app/ipfsUpload/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { id } from "ethers";
import { pinataClient } from "~~/utils/simpleNFT/pinataClient";

// import { customizeNftMetadata } from "~~/utils/simpleNFT/nftsMetadata";

export type IPType = "" | "patent" | "trademark" | "copyright" | "trade_secret";

export interface IP{
Expand Down Expand Up @@ -187,6 +186,7 @@ const uploadIP = () => {

handleMintItem();

router.push("/myIPs");
// handleSetTokenUri(data.url);

} catch (err) {
Expand Down
Loading

0 comments on commit a70aa32

Please sign in to comment.