-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d88a45
commit 69ea06d
Showing
17 changed files
with
991 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
"use client"; | ||
|
||
import type { NextPage } from "next"; | ||
import { useAccount } from "@starknet-react/core"; | ||
import { CustomConnectButton } from "~~/components/scaffold-stark/CustomConnectButton"; | ||
import { SetStateAction, useState } from "react" | ||
import { Button } from "~~/components/ui/button" | ||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "~~/components/ui/card" | ||
import { Input } from "~~/components/ui/input" | ||
import { Label } from "~~/components/ui/label" | ||
import { Textarea } from "~~/components/ui/textarea" | ||
import { Select, SelectItem } from "~~/components/ui/select2" | ||
import { DollarSign, Target, Users } from "lucide-react"; | ||
|
||
const createComission: NextPage = () => { | ||
const { address: connectedAddress, isConnected, isConnecting } = useAccount(); | ||
|
||
const [fundingGoal, setFundingGoal] = useState(10000) | ||
const [duration, setDuration] = useState(30) | ||
|
||
// Mock user's IP data | ||
const userIPs = [ | ||
{ id: "ip1", name: "AI-Powered Neural Interface" }, | ||
{ id: "ip2", "name": "Quantum Encryption Algorithm" }, | ||
{ id: "ip3", "name": "Sustainable Energy Converter" }, | ||
] | ||
return ( | ||
<> | ||
|
||
|
||
|
||
<div className="min-h-screen py-12 px-4 sm:px-6 lg:px-8"> | ||
|
||
|
||
|
||
{!isConnected || isConnecting ? ( | ||
<CustomConnectButton /> | ||
) : ( | ||
|
||
|
||
<div className="max-w-10xl mx-auto"> | ||
|
||
<h1 className="text-3xl font-bold mb-6">Commission Intellectual Property</h1> | ||
|
||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8"> | ||
|
||
|
||
<Card className="bg-base-100"> | ||
<CardHeader> | ||
<CardTitle>Commission IP from a Freelancer</CardTitle> | ||
<CardDescription>Describe the intellectual property you need created</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<form> | ||
<div className="grid gap-6"> | ||
<div> | ||
<Label htmlFor="project-name">Project Name</Label> | ||
<Input id="project-name" placeholder="Enter a name for your project" className="w-full rounded input input-bordered bg-base-300" /> | ||
</div> | ||
<div> | ||
<Label htmlFor="ip-type">IP Type</Label> | ||
<Select id="ip-type" className="w-full rounded input input-bordered bg-base-300"> | ||
<SelectItem value="software">Software</SelectItem> | ||
<SelectItem value="design">Graphic Design</SelectItem> | ||
<SelectItem value="writing">Writing</SelectItem> | ||
<SelectItem value="music">Music</SelectItem> | ||
<SelectItem value="invention">Invention</SelectItem> | ||
</Select> | ||
</div> | ||
<div> | ||
<Label htmlFor="description">Project Description</Label> | ||
<Textarea id="description" placeholder="Describe the intellectual property you need created" className="w-full rounded input input-bordered bg-base-300" /> | ||
</div> | ||
<div> | ||
<Label htmlFor="budget">Budget ($)</Label> | ||
<Input id="budget" type="number" placeholder="Enter your budget for this project" className="w-full rounded input input-bordered bg-base-300" /> | ||
</div> | ||
<div> | ||
<Label htmlFor="deadline">Deadline</Label> | ||
<Input id="deadline" type="date" className="w-full rounded input input-bordered bg-base-300" /> | ||
</div> | ||
<div> | ||
<Label htmlFor="requirements">Special Requirements</Label> | ||
<Textarea id="requirements" placeholder="Any specific requirements or skills needed" className="w-full rounded input input-bordered bg-base-300" /> | ||
</div> | ||
</div> | ||
</form> | ||
</CardContent> | ||
<CardFooter> | ||
<Button>Post Project</Button> | ||
</CardFooter> | ||
</Card> | ||
|
||
<div className="mt-8 grid md:grid-cols-2 gap-6"> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle>Campaign Benefits</CardTitle> | ||
</CardHeader> | ||
<CardContent className="space-y-4"> | ||
<div className="flex items-center space-x-4"> | ||
<DollarSign className="w-8 h-8 text-primary" /> | ||
<div> | ||
<h3 className="font-semibold">Publish</h3> | ||
<p className="text-sm text-muted-foreground">Order your intellectual property on our marketplace.</p> | ||
</div> | ||
</div> | ||
<div className="flex items-center space-x-4"> | ||
<Users className="w-8 h-8 text-primary" /> | ||
<div> | ||
<h3 className="font-semibold">Secure</h3> | ||
<p className="text-sm text-muted-foreground">Your order is executed through smart contracts.</p> | ||
</div> | ||
</div> | ||
<div className="flex items-center space-x-4"> | ||
<Target className="w-8 h-8 text-primary" /> | ||
<div> | ||
<h3 className="font-semibold">Licensing</h3> | ||
<p className="text-sm text-muted-foreground">All information is recorded on the blockchain.</p> | ||
</div> | ||
</div> | ||
</CardContent> | ||
</Card> | ||
|
||
<Card> | ||
<CardHeader> | ||
<CardTitle>How It Works</CardTitle> | ||
</CardHeader> | ||
<CardContent> | ||
<ol className="list-decimal list-inside space-y-2"> | ||
<li>Create your campaign with details about your IP</li> | ||
<li>Set your budget and extra details</li> | ||
<li>Publish your order</li> | ||
<li>Stay tuned for app updates and notifications.</li> | ||
<li>Analise prospect proposals</li> | ||
<li>Aprove the comission</li> | ||
<li>Receive your digital asset</li> | ||
</ol> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
</div> | ||
|
||
)} | ||
</div> | ||
|
||
|
||
|
||
|
||
</> | ||
); | ||
}; | ||
|
||
export default createComission; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
"use client"; | ||
|
||
import type { NextPage } from "next"; | ||
import { useAccount } from "@starknet-react/core"; | ||
import { CustomConnectButton } from "~~/components/scaffold-stark/CustomConnectButton"; | ||
import { SetStateAction, useState } from "react" | ||
import { Button } from "~~/components/ui/button" | ||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "~~/components/ui/card" | ||
import { Input } from "~~/components/ui/input" | ||
import { Label } from "~~/components/ui/label" | ||
import { Textarea } from "~~/components/ui/textarea" | ||
import { Slider } from "~~/components/ui/slider" | ||
import { Switch } from "~~/components/ui/switch" | ||
import { Calendar, DollarSign, Users, Clock, Target } from "lucide-react" | ||
|
||
const createCrowdfunding: NextPage = () => { | ||
const { address: connectedAddress, isConnected, isConnecting } = useAccount(); | ||
|
||
const [fundingGoal, setFundingGoal] = useState(10000) | ||
const [duration, setDuration] = useState(30) | ||
|
||
// Mock user's IP data | ||
const userIPs = [ | ||
{ id: "ip1", name: "AI-Powered Neural Interface" }, | ||
{ id: "ip2", "name": "Quantum Encryption Algorithm" }, | ||
{ id: "ip3", "name": "Sustainable Energy Converter" }, | ||
] | ||
return ( | ||
<> | ||
|
||
|
||
|
||
<div className="min-h-screen py-12 px-4 sm:px-6 lg:px-8"> | ||
|
||
|
||
|
||
{!isConnected || isConnecting ? ( | ||
<CustomConnectButton /> | ||
) : ( | ||
|
||
|
||
<div className="max-w-10xl mx-auto"> | ||
|
||
<h1 className="text-3xl font-bold mb-6">Create Crowdfunding Campaign</h1> | ||
|
||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8"> | ||
|
||
|
||
<Card className="shadow bg-base-100"> | ||
<CardHeader> | ||
<CardTitle>Campaign Details</CardTitle> | ||
<CardDescription>Set up your intellectual property crowdfunding campaign</CardDescription> | ||
</CardHeader> | ||
<CardContent className="space-y-6"> | ||
<div className="space-y-2"> | ||
<Label htmlFor="ip-select">Select Intellectual Property</Label> | ||
<Input id="ip-select" placeholder="Select your IP" /> | ||
</div> | ||
|
||
<div className="space-y-2"> | ||
<Label htmlFor="campaign-name">Campaign Name</Label> | ||
<Input id="campaign-name" placeholder="Enter campaign name" /> | ||
</div> | ||
|
||
<div className="space-y-2"> | ||
<Label htmlFor="campaign-description">Campaign Description</Label> | ||
<Textarea id="campaign-description" placeholder="Describe your campaign and how the funds will be used" /> | ||
</div> | ||
|
||
<div className="space-y-2"> | ||
<Label htmlFor="funding-goal">Funding Goal (USD)</Label> | ||
<div className="flex items-center space-x-4"> | ||
<Input | ||
id="funding-goal" | ||
type="number" | ||
value={fundingGoal} | ||
onChange={(e) => setFundingGoal(Number(e.target.value))} | ||
className="w-32" | ||
/> | ||
<Slider | ||
value={[fundingGoal]} | ||
onValueChange={(value) => setFundingGoal(value[0])} | ||
max={1000000} | ||
step={1000} | ||
className="flex-1" | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div className="space-y-2"> | ||
<Label htmlFor="campaign-duration">Campaign Duration (Days)</Label> | ||
<div className="flex items-center space-x-4"> | ||
<Input | ||
id="campaign-duration" | ||
type="number" | ||
value={duration} | ||
onChange={(e) => setDuration(Number(e.target.value))} | ||
className="w-20" | ||
/> | ||
<Slider | ||
value={[duration]} | ||
onValueChange={(value) => setDuration(value[0])} | ||
max={90} | ||
step={1} | ||
className="flex-1" | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div className="flex items-center space-x-2"> | ||
<Switch id="terms" /> | ||
<Label htmlFor="terms">I agree to the terms and conditions</Label> | ||
</div> | ||
</CardContent> | ||
<CardFooter> | ||
<Button className="w-full">Create Campaign</Button> | ||
</CardFooter> | ||
</Card> | ||
|
||
<div className="mt-8 grid md:grid-cols-2 gap-6"> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle>Campaign Benefits</CardTitle> | ||
</CardHeader> | ||
<CardContent className="space-y-4"> | ||
<div className="flex items-center space-x-4"> | ||
<DollarSign className="w-8 h-8 text-primary" /> | ||
<div> | ||
<h3 className="font-semibold">Raise Capital</h3> | ||
<p className="text-sm text-muted-foreground">Secure funding for your intellectual property development</p> | ||
</div> | ||
</div> | ||
<div className="flex items-center space-x-4"> | ||
<Users className="w-8 h-8 text-primary" /> | ||
<div> | ||
<h3 className="font-semibold">Build Community</h3> | ||
<p className="text-sm text-muted-foreground">Engage with supporters and potential customers</p> | ||
</div> | ||
</div> | ||
<div className="flex items-center space-x-4"> | ||
<Target className="w-8 h-8 text-primary" /> | ||
<div> | ||
<h3 className="font-semibold">Validate Market</h3> | ||
<p className="text-sm text-muted-foreground">Gauge interest and demand for your innovation</p> | ||
</div> | ||
</div> | ||
</CardContent> | ||
</Card> | ||
|
||
<Card> | ||
<CardHeader> | ||
<CardTitle>How It Works</CardTitle> | ||
</CardHeader> | ||
<CardContent> | ||
<ol className="list-decimal list-inside space-y-2"> | ||
<li>Create your campaign with details about your IP</li> | ||
<li>Set your funding goal and campaign duration</li> | ||
<li>Share your campaign with potential backers</li> | ||
<li>Receive funds if your goal is met within the timeframe</li> | ||
<li>Deliver on your promises and keep backers updated</li> | ||
</ol> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
</div> | ||
|
||
)} | ||
</div> | ||
|
||
|
||
|
||
|
||
</> | ||
); | ||
}; | ||
|
||
export default createCrowdfunding; |
Oops, something went wrong.