Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 84 additions & 28 deletions frontend/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions frontend/src/app/Faq/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";

import Button from '@/components/Button';
import Link from "next/link";
import { useState } from "react";
import { ChevronLeft, Plus, Minus } from "lucide-react";
Expand Down Expand Up @@ -86,7 +86,7 @@ export default function CryptoFAQ() {
key={item.id}
className="overflow-hidden rounded-2xl border border-white/10 bg-[#0f172a]/90"
>
<button
<Button
type="button"
className="flex w-full items-center justify-between gap-4 px-5 py-5 text-left transition hover:bg-white/5"
onClick={() => toggleFAQ(item.id)}
Expand All @@ -101,7 +101,7 @@ export default function CryptoFAQ() {
<Plus size={18} />
)}
</span>
</button>
</Button>

{item.isOpen && (
<div className="border-t border-white/10 px-5 py-5 text-[15px] leading-7 text-[#cbd5e1]">
Expand Down
31 changes: 11 additions & 20 deletions frontend/src/app/community-courses/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
import Button from '@/components/Button';
import { useState, useEffect } from "react";
import Coursenav from "@/component/coursenav";
import CommunityCard from "@/component/CommunityCard";
Expand Down Expand Up @@ -172,13 +173,7 @@ export default function CommunityCoursesPage() {
Explore Courses Created By The Community Or Share Your Own
</p>
</div>
<button
type="button"
aria-label="Create a new course"
className="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded"
>
Create Course
</button>

</div>

{/* Search and Create Course */}
Expand Down Expand Up @@ -216,19 +211,15 @@ export default function CommunityCoursesPage() {
{ id: "top rated", label: "Top Rated" },
{ id: "new", label: "New" },
].map((filter) => (
<button
key={filter.id}
type="button"
aria-pressed={selectedTag === filter.id}
onClick={() => setSelectedTag(filter.id)}
className={`px-4 py-2 rounded-full ${
selectedTag === filter.id
? "bg-black text-white shadow-lg"
: "bg-gray-400 bg-opacity-50 text-gray-200 hover:bg-opacity-70 hover:shadow"
}`}
>
{filter.label}
</button>
<Button
key={filter.id}
variant={selectedTag === filter.id ? "primary" : "secondary"}
onClick={() => setSelectedTag(filter.id)}
className="rounded-full px-4 py-2"
aria-pressed={selectedTag === filter.id}
>
{filter.label}
</Button>
))}
</div>

Expand Down
47 changes: 22 additions & 25 deletions frontend/src/app/contact/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";

import Button from '@/components/Button';
import { useState } from "react";
import Link from "next/link";
import { ChevronLeft, Send, CheckCircle, AlertCircle, MessageSquare, Twitter, Github } from "lucide-react";
Expand Down Expand Up @@ -107,24 +107,25 @@ export default function ContactPage() {
<p className="text-[#94a3b8]">
Thanks for reaching out. We typically respond within 24–48 hours.
</p>
<button
onClick={() => setStatus("idle")}
className="mt-2 rounded-xl bg-[#4FD1C5] px-6 py-2.5 text-sm font-semibold text-[#0f172a] transition hover:bg-[#38b2ac]"
>
Send another message
</button>
<Button
variant="secondary"
onClick={() => setStatus("idle")}
>
Try again
</Button>
</div>
) : status === "error" ? (
<div className="flex flex-col items-center gap-4 rounded-2xl border border-red-500/20 bg-[#0b1220] px-6 py-12 text-center">
<AlertCircle size={48} className="text-red-400" />
<h2 className="text-xl font-semibold">Something went wrong</h2>
<p className="text-[#94a3b8]">Please try again or reach us directly via social media.</p>
<button
onClick={() => setStatus("idle")}
className="mt-2 rounded-xl bg-red-500/20 px-6 py-2.5 text-sm font-semibold text-red-300 transition hover:bg-red-500/30"
>
Try again
</button>
<Button
variant="danger"
onClick={() => setStatus("idle")}
className="mt-2"
>
Try again
</Button>
</div>
) : (
<form onSubmit={handleSubmit} noValidate className="space-y-5">
Expand Down Expand Up @@ -185,18 +186,14 @@ export default function ContactPage() {
{errors.message && <p className="mt-1 text-xs text-red-400">{errors.message}</p>}
</div>

<button
type="submit"
disabled={loading}
className="inline-flex w-full items-center justify-center gap-2 rounded-xl bg-[#4FD1C5] px-6 py-3 text-sm font-semibold text-[#0f172a] transition hover:bg-[#38b2ac] disabled:opacity-60 sm:w-auto"
>
{loading ? (
<span className="h-4 w-4 animate-spin rounded-full border-2 border-[#0f172a] border-t-transparent" />
) : (
<Send size={16} />
)}
{loading ? "Sending…" : "Send Message"}
</button>
<Button
type="submit"
variant="primary"
isLoading={loading}
className="w-full"
>
{loading ? "Sending..." : "Send Message"}
</Button>
</form>
)}
</div>
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/app/docs/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";

import Button from '@/components/Button';
import React, { useState } from "react";
import Header from "@/component/Header";
import Footer from "@/component/Footer";
Expand Down Expand Up @@ -180,9 +180,9 @@ export default function DocsPage() {
{section.external ? <ExternalLink className="ml-2 w-4 h-4" /> : <ChevronRight className="ml-1 w-4 h-4" />}
</Link>
) : (
<button className="flex items-center text-sm font-semibold text-[#4FD1C5] hover:underline cursor-default">
<Button className="flex items-center text-sm font-semibold text-[#4FD1C5] hover:underline cursor-default">
Coming Soon <ChevronRight className="ml-1 w-4 h-4 opacity-50" />
</button>
</Button>
)}
</div>
</motion.div>
Expand All @@ -205,12 +205,12 @@ export default function DocsPage() {
New to prediction markets? Understand how prices reflect probability, how liquidity works, and why decentralized markets offer superior insight compared to traditional polling.
</p>
<div className="flex flex-wrap gap-4">
<button className="bg-[#4FD1C5] hover:bg-[#3dbbb0] text-[#141824] font-bold px-8 py-3 rounded-xl transition-all shadow-lg shadow-[#4FD1C5]/20 transform active:scale-95">
<Button className="bg-[#4FD1C5] hover:bg-[#3dbbb0] text-[#141824] font-bold px-8 py-3 rounded-xl transition-all shadow-lg shadow-[#4FD1C5]/20 transform active:scale-95">
Start Learning
</button>
<button className="bg-white/10 hover:bg-white/20 border border-white/10 px-8 py-3 rounded-xl transition-all font-semibold backdrop-blur-sm">
</Button>
<Button className="bg-white/10 hover:bg-white/20 border border-white/10 px-8 py-3 rounded-xl transition-all font-semibold backdrop-blur-sm">
View All Guides
</button>
</Button>
</div>
</div>
</section>
Expand All @@ -231,13 +231,13 @@ export default function DocsPage() {
key={idx}
className="border border-white/10 rounded-2xl bg-white/5 overflow-hidden transition-colors hover:border-white/20"
>
<button
<Button
onClick={() => setActiveFaq(activeFaq === idx ? null : idx)}
className="w-full flex items-center justify-between p-6 text-left"
>
<span className="font-semibold text-lg">{faq.question}</span>
<ChevronDown className={`w-5 h-5 text-gray-500 transition-transform ${activeFaq === idx ? 'rotate-180 text-[#4FD1C5]' : ''}`} />
</button>
</Button>
<AnimatePresence>
{activeFaq === idx && (
<motion.div
Expand Down
22 changes: 11 additions & 11 deletions frontend/src/app/events/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";

import Button from '@/components/Button';
import { useState } from "react";
import { Search, Filter, ChevronDown } from "lucide-react";
import Header from "@/component/Header";
Expand Down Expand Up @@ -125,12 +125,12 @@ export default function EventsPage() {
</p>

<div className="flex flex-col sm:flex-row gap-4 justify-center">
<button className="px-8 py-3 bg-[#4FD1C5] text-white font-semibold rounded-xl hover:bg-[#3dbdb3] transition">
<Button className="px-8 py-3 bg-[#4FD1C5] text-white font-semibold rounded-xl hover:bg-[#3dbdb3] transition">
Browse Events
</button>
<button className="px-8 py-3 bg-transparent border border-gray-600 text-white font-semibold rounded-xl hover:bg-white/5 transition">
</Button>
<Button className="px-8 py-3 bg-transparent border border-gray-600 text-white font-semibold rounded-xl hover:bg-white/5 transition">
View Competitions
</button>
</Button>
</div>
</div>
</div>
Expand All @@ -151,7 +151,7 @@ export default function EventsPage() {
{/* Tabs */}
<div className="flex gap-2 bg-[#1e293b] p-1 rounded-xl">
{tabs.map((tab) => (
<button
<Button
key={tab.id}
onClick={() => setActiveTab(tab.id)}
className={`px-6 py-2 rounded-lg font-medium transition ${
Expand All @@ -161,20 +161,20 @@ export default function EventsPage() {
}`}
>
{tab.label}
</button>
</Button>
))}
</div>

{/* Filter and Sort */}
<div className="flex gap-3">
<button className="flex items-center gap-2 px-4 py-3 bg-[#1e293b] text-gray-300 rounded-xl border border-gray-700/50 hover:bg-[#2d3b52] transition">
<Button className="flex items-center gap-2 px-4 py-3 bg-[#1e293b] text-gray-300 rounded-xl border border-gray-700/50 hover:bg-[#2d3b52] transition">
<Filter className="h-4 w-4" />
Filter
</button>
<button className="flex items-center gap-2 px-4 py-3 bg-[#1e293b] text-gray-300 rounded-xl border border-gray-700/50 hover:bg-[#2d3b52] transition">
</Button>
<Button className="flex items-center gap-2 px-4 py-3 bg-[#1e293b] text-gray-300 rounded-xl border border-gray-700/50 hover:bg-[#2d3b52] transition">
Most Popular
<ChevronDown className="h-4 w-4" />
</button>
</Button>
</div>
</div>
</div>
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/app/externaltools/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
import Button from '@/components/Button';
import Header from "@/component/resources/Header";
import Footer from "@/component/resources/Footer";
import React, { useState } from "react";
Expand Down Expand Up @@ -103,7 +104,7 @@ const Resources = () => {
{item.description}
</div>
<div className="py-6 px-2">
<button className="cursor-pointer border w-full rounded-lg py-1">
<Button className="cursor-pointer border w-full rounded-lg py-1">
<a
href={item.link}
target="_blank"
Expand All @@ -112,7 +113,7 @@ const Resources = () => {
View {item.name}
<ExternalLink className="size-5" />
</a>
</button>
</Button>
</div>
</div>
))}
Expand All @@ -126,9 +127,9 @@ const Resources = () => {
</p>
</div>
<div className="flex items-center justify-center pb-4">
<button className="underline border w-[30%] rounded-lg py-1 text-[14px]">
<Button className="underline border w-[30%] rounded-lg py-1 text-[14px]">
Learn More In Our Courses
</button>
</Button>
</div>
</div>
</div>
Expand Down
13 changes: 7 additions & 6 deletions frontend/src/app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
import Button from '@/components/Button';
import { useState } from "react";
import type { NextPage } from "next";
import Head from "next/head";
Expand Down Expand Up @@ -53,7 +54,7 @@ const Login: NextPage = () => {
<div className="mt-8 space-y-6">
{/* OAuth Buttons */}
<div className="grid grid-cols-2 gap-4">
<button
<Button
type="button"
aria-label="Continue with Google"
className="flex items-center justify-center w-full py-2 px-4 bg-purple-800 text-white rounded-md hover:bg-purple-700 transition"
Expand All @@ -64,15 +65,15 @@ const Login: NextPage = () => {
className="w-5 h-5 mr-2"
/>
Google
</button>
<button
</Button>
<Button
type="button"
aria-label="Continue with GitHub"
className="flex items-center justify-center w-full py-2 px-4 bg-purple-800 text-white rounded-md hover:bg-purple-700 transition"
>
<Github className="w-5 h-5 mr-2" />
Git Hub
</button>
</Button>
</div>

{/* Divider */}
Expand Down Expand Up @@ -130,12 +131,12 @@ const Login: NextPage = () => {
</p>
</div>

<button
<Button
type="submit"
className="w-full py-3 px-4 bg-purple-700 hover:bg-purple-600 text-white font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 focus:ring-offset-gray-900 mt-6"
>
Login
</button>
</Button>
</form>

<div className="text-center mt-4">
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/app/markets/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";

import Button from '@/components/Button';
import { useEffect, useMemo, useState } from "react";
import {
ArrowUpRight,
Expand Down Expand Up @@ -292,7 +292,7 @@ export default function MarketsPage() {

<div className="grid gap-4">
{filteredMarkets.map((market) => (
<button
<Button
key={market.id}
type="button"
onClick={() => setSelectedId(market.id)}
Expand Down Expand Up @@ -355,7 +355,7 @@ export default function MarketsPage() {
<span>{market.traders.toLocaleString()} traders</span>
</div>
</div>
</button>
</Button>
))}
</div>
</div>
Expand Down Expand Up @@ -402,13 +402,13 @@ export default function MarketsPage() {
</div>
</div>

<button
<Button
type="button"
className="inline-flex w-full items-center justify-center gap-2 rounded-2xl bg-[#2f9e9d] px-5 py-3 text-sm font-semibold text-white transition hover:bg-[#38adaa]"
>
View market details
<ArrowUpRight className="h-4 w-4" />
</button>
</Button>
</div>
) : null}
</aside>
Expand Down
Loading
Loading