Skip to content
Open
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
52 changes: 26 additions & 26 deletions app/createHackathon/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,24 +295,24 @@ export default function CreateHackathon() {
<div className="min-h-screen p-4">
<div className="max-w-4xl mx-auto py-8">
{/* Header */}
<div className="flex items-center justify-between mb-8">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-8">
<Button
variant="outline"

onClick={() => router.push('/explorer')}
className="flex items-center gap-2 border-amber-300 bg-white text-[#8B6914] hover:bg-[#FAE5C3] hover:text-gray-800 hover:border-none"
>
<ArrowLeft className="w-4 h-4 text-[#8B6914]" />
Back to Explorer
<span className="hidden sm:inline">Back to Explorer</span>
<span className="sm:hidden">Back</span>
</Button>

<div className="text-center">
<h1 className="text-4xl font-bold bg-gradient-to-r from-amber-600 to-orange-500 bg-clip-text text-transparent">
<div className="text-center flex-1">
<h1 className="text-3xl sm:text-4xl font-bold bg-gradient-to-r from-amber-600 to-orange-500 bg-clip-text text-transparent">
Create Hackathon
</h1>
</div>

<div className="w-32" /> {/* Spacer for centering */}
<div className="hidden sm:block w-32" /> {/* Spacer for centering */}
</div>

<form onSubmit={handleSubmit} className="space-y-8">
Expand All @@ -321,14 +321,14 @@ export default function CreateHackathon() {
<CardContent className="space-y-6 pt-6">
{/* Hackathon Name */}
<div className="space-y-2">
<div className="flex items-center gap-4">
<div className="flex items-center gap-2 min-w-[200px]">
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-4">
<div className="flex items-center gap-2 w-full sm:min-w-[200px]">
<Sparkles className="w-4 h-4 text-[#8B6914]" />
<Label htmlFor="name" className="text-gray-700 font-medium">Hackathon Name *</Label>
<button
type="button"
onClick={() => toggleInfo('name')}
className="text-amber-600 hover:text-amber-700"
className="text-amber-600 hover:text-amber-700 ml-auto sm:ml-0"
>
<Info className="w-4 h-4 text-[#8B6914]" />
</button>
Expand All @@ -338,11 +338,11 @@ export default function CreateHackathon() {
value={formData.name}
onChange={(e) => setFormData({ ...formData, name: e.target.value })}
placeholder="Enter hackathon name"
className="border-amber-200 focus:border-amber-500 bg-white text-gray-900 placeholder:text-gray-500 flex-1"
className="border-amber-200 focus:border-amber-500 bg-white text-gray-900 placeholder:text-gray-500 flex-1 w-full"
/>
</div>
{showInfo.name && (
<p className="text-sm text-gray-600 ml-[212px]">
<p className="text-sm text-gray-600 sm:ml-[212px]">
Choose a unique and descriptive name for your hackathon
</p>
)}
Expand All @@ -353,28 +353,28 @@ export default function CreateHackathon() {
{/* Date and Time */}
<div className="space-y-4">
{/* Timezone Toggle */}
<div className="flex items-center gap-4">
<div className="flex items-center gap-2 min-w-[200px]">
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-4">
<div className="flex items-center gap-2 w-full sm:min-w-[200px]">
<Globe className="w-4 h-4 text-[#8B6914]" />
<Label className="text-gray-700 font-medium">Timezone</Label>
<button
type="button"
onClick={() => toggleInfo('timezone')}
className="text-amber-600 hover:text-amber-700"
className="text-amber-600 hover:text-amber-700 ml-auto sm:ml-0"
>
<Info className="w-4 h-4 text-[#8B6914]" />
</button>
</div>
<div className="flex items-center gap-2">
<div className="flex items-center gap-2 w-full sm:w-auto">
<Button
type="button"
variant={timezoneMode === 'local' ? 'default' : 'outline'}
size="sm"
onClick={() => setTimezoneMode('local')}
className={timezoneMode === 'local'
className={`flex-1 sm:flex-initial ${timezoneMode === 'local'
? 'bg-[#8B6914] text-white hover:bg-[#8B6914] hover:bg-[#FAE5C3] hover:text-[#8B6914] border-none'
: 'bg-[#FAE5C3] text-[#8B6914] hover:bg-[#8B6914] hover:text-white border-none'
}
}`}
>
Local Time
</Button>
Expand All @@ -383,17 +383,17 @@ export default function CreateHackathon() {
variant={timezoneMode === 'utc' ? 'default' : 'outline'}
size="sm"
onClick={() => setTimezoneMode('utc')}
className={timezoneMode === 'utc'
className={`flex-1 sm:flex-initial ${timezoneMode === 'utc'
? 'bg-[#8B6914] text-white hover:bg-[#8B6914] hover:bg-[#FAE5C3] hover:text-[#8B6914] border-none'
: 'bg-[#FAE5C3] text-[#8B6914] hover:bg-[#8B6914] hover:text-white border-none'
}
}`}
>
UTC
</Button>
</div>
</div>
{showInfo.timezone && (
<p className="text-sm text-gray-600 mb-4 ml-[212px]">
<p className="text-sm text-gray-600 mb-4 sm:ml-[212px]">
Choose how you want to input times. Local time will be converted to UTC for storage on the blockchain.
All times are ultimately stoamber and displayed in UTC format.
</p>
Comment on lines +396 to 399
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in info text.

"stoamber" should be "stored".

 <p className="text-sm text-gray-600 mb-4 sm:ml-[212px]">
   Choose how you want to input times. Local time will be converted to UTC for storage on the blockchain.
-  All times are ultimately stoamber and displayed in UTC format.
+  All times are ultimately stored and displayed in UTC format.
 </p>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<p className="text-sm text-gray-600 mb-4 sm:ml-[212px]">
Choose how you want to input times. Local time will be converted to UTC for storage on the blockchain.
All times are ultimately stoamber and displayed in UTC format.
</p>
<p className="text-sm text-gray-600 mb-4 sm:ml-[212px]">
Choose how you want to input times. Local time will be converted to UTC for storage on the blockchain.
All times are ultimately stored and displayed in UTC format.
</p>
🤖 Prompt for AI Agents
In app/createHackathon/page.tsx around lines 396 to 399, the paragraph text
contains a typo: "stoamber" should be "stored"; update the string to read "All
times are ultimately stored and displayed in UTC format." so the UI displays the
correct wording.

Expand Down Expand Up @@ -458,14 +458,14 @@ export default function CreateHackathon() {

{/* Image URL */}
<div className="space-y-2">
<div className="flex items-center gap-4">
<div className="flex items-center gap-2 min-w-[200px]">
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-4">
<div className="flex items-center gap-2 w-full sm:min-w-[200px]">
<Globe className="w-4 h-4 text-[#8B6914]" />
<Label htmlFor="imageURL" className="text-gray-700 font-medium">Image URL (Optional)</Label>
<button
type="button"
onClick={() => toggleInfo('imageURL')}
className="text-amber-600 hover:text-amber-700"
className="text-amber-600 hover:text-amber-700 ml-auto sm:ml-0"
>
<Info className="w-4 h-4 text-[#8B6914]" />
</button>
Expand All @@ -475,11 +475,11 @@ export default function CreateHackathon() {
value={formData.imageURL}
onChange={(e) => setFormData({ ...formData, imageURL: e.target.value })}
placeholder="https://example.com/image.png"
className="border-amber-200 focus:border-amber-500 bg-white text-gray-900 placeholder:text-gray-500 flex-1"
className="border-amber-200 focus:border-amber-500 bg-white text-gray-900 placeholder:text-gray-500 flex-1 w-full"
/>
</div>
{showInfo.imageURL && (
<p className="text-sm text-gray-600 ml-[212px]">
<p className="text-sm text-gray-600 sm:ml-[212px]">
Optional URL for hackathon banner image. Leave empty to use default blockchain block image.
</p>
)}
Expand Down Expand Up @@ -703,7 +703,7 @@ export default function CreateHackathon() {
type="submit"
size="lg"
disabled={isLoading}
className="bg-[#FAE5C3] text-[#8B6914] hover:bg-[#8B6914] hover:text-white px-12 py-3 shadow-md hover:shadow-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed"
className="bg-[#FAE5C3] text-[#8B6914] hover:bg-[#8B6914] hover:text-white px-6 sm:px-12 py-3 shadow-md hover:shadow-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed w-full sm:w-auto"
>
{isLoading ? (
<>
Expand Down
41 changes: 19 additions & 22 deletions app/explorer/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -463,29 +463,26 @@ function ExplorerPageContent() {
return (
<div className="space-y-8">
<div className="text-center space-y-4">
<div className="flex items-center justify-between">
<div className="flex-1"></div>
<h1 className="text-4xl font-bold bg-gradient-to-r from-amber-700 to-orange-600 bg-clip-text text-transparent">
<div className="flex flex-col sm:flex-row items-center justify-between gap-4">
<h1 className="text-3xl sm:text-4xl font-bold bg-gradient-to-r from-amber-700 to-orange-600 bg-clip-text text-transparent">
Explore Hackathons
</h1>
<div className="flex-1 flex justify-end">
<div className="flex flex-col items-end">
<Button
onClick={handleSync}
disabled={syncing || loading}
variant="outline"
size="sm"
className="border-amber-300 text-amber-700 hover:bg-amber-50 mb-2"
>
<RotateCcw className={`w-4 h-4 mr-2 ${syncing ? 'animate-spin' : ''}`} />
{syncing ? 'Syncing...' : 'Sync'}
</Button>
{lastSyncTime && (
<span className="text-xs text-gray-500">
Last synced: {lastSyncTime.toLocaleTimeString()}
</span>
)}
</div>
<div className="flex flex-col items-center sm:items-end">
<Button
onClick={handleSync}
disabled={syncing || loading}
variant="outline"
size="sm"
className="border-amber-300 text-amber-700 hover:bg-amber-50 mb-2"
>
<RotateCcw className={`w-4 h-4 mr-2 ${syncing ? 'animate-spin' : ''}`} />
{syncing ? 'Syncing...' : 'Sync'}
</Button>
{lastSyncTime && (
<span className="text-xs text-gray-500">
Last synced: {lastSyncTime.toLocaleTimeString()}
</span>
)}
</div>
</div>
</div>
Expand Down Expand Up @@ -520,7 +517,7 @@ function ExplorerPageContent() {

{/* Results Info */}
{effectiveTotal > 0 && (
<div className="flex items-center justify-between text-sm text-gray-600">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 text-sm text-gray-600">
<span>
Showing {startItem}-{endItem} of {effectiveTotal} hackathons
{hasActiveFilters && ` (filtered from ${totalHackathons} total)`}
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function RootLayout({
disableTransitionOnChange
> */}
<Navigation />
<main className="max-w-8xl mx-32 px-4 sm:px-6 lg:px-8 py-8">
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-8">
{children}
</main>
{/* </ThemeProvider> */}
Expand Down
16 changes: 8 additions & 8 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export default function HomePage() {
<div className="relative">
{/* Main heading with enhanced styling */}
<div className="relative z-10 -mt-24 pb-8">
<h1 className="text-6xl lg:text-7xl font-black leading-tight">
<h1 className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-black leading-tight">
<span className="block text-transparent bg-clip-text bg-gradient-to-r from-amber-600 via-orange-500 to-amber-700 drop-shadow-sm">
<DecryptedText
text="Welcome to the On-Chain"
Expand All @@ -232,7 +232,7 @@ export default function HomePage() {
encryptedClassName="text-amber-400/40"
/>
</span>
<span className="block text-6xl lg:text-8xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-amber-700 via-orange-600 to-amber-800 mt-4 tracking-tight">
<span className="block text-4xl sm:text-5xl md:text-6xl lg:text-8xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-amber-700 via-orange-600 to-amber-800 mt-4 tracking-tight">
<DecryptedText
text="Hackathon Hub."
animateOn="view"
Expand All @@ -250,7 +250,7 @@ export default function HomePage() {
<div className="mt-6 w-24 h-1 bg-gradient-to-r from-amber-500 to-orange-500 rounded-full shadow-lg"></div>

<div className="mt-8">
<p className="text-xl lg:text-2xl font-semibold text-transparent bg-clip-text bg-gradient-to-r from-amber-600 to-orange-600 tracking-wider">
<p className="text-base sm:text-lg md:text-xl lg:text-2xl font-semibold text-transparent bg-clip-text bg-gradient-to-r from-amber-600 to-orange-600 tracking-wider">
<DecryptedText
text="Transparent. Permissionless. Intuitive."
animateOn="view"
Expand Down Expand Up @@ -298,9 +298,9 @@ export default function HomePage() {
{/* Small decorative elements */}

<div className="relative z-10 mt-">
<div className="flex items-center justify-between">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4">
<div>
<h2 className="text-4xl lg:text-5xl font-black leading-tight">
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-black leading-tight">
<span className="block text-transparent bg-clip-text bg-gradient-to-r from-amber-600 via-orange-500 to-amber-700">
Think. Build. Innovate.
</span>
Expand All @@ -311,7 +311,7 @@ export default function HomePage() {
</div>

{/* Sync Button */}
<div className="flex flex-col items-end">
<div className="flex flex-col items-start sm:items-end">
<Button
onClick={handleSync}
disabled={syncing || loading}
Expand Down Expand Up @@ -344,12 +344,12 @@ export default function HomePage() {
const statusBadge = getStatusBadge(status)

return (
<div key={`${hackathon.contractAddress}-${index}`} className="flex-shrink-0 mx-4">
<div key={`${hackathon.contractAddress}-${index}`} className="flex-shrink-0 mx-2 sm:mx-4">
<Link
href={`/h?hackAddr=${hackathon.contractAddress}&chainId=${chainId}`}
className="block"
>
<Card className="w-[350px] bg-white border border-gray-200 rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-2 cursor-pointer">
<Card className="w-[280px] sm:w-[320px] md:w-[350px] bg-white border border-gray-200 rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-2 cursor-pointer">
<CardContent className="p-5">
<div className="space-y-3">
{/* Header */}
Expand Down
16 changes: 8 additions & 8 deletions components/hackathon-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ export default function HackathonCard({ hackathon, showJoinButton = true }: Hack
</div>
</div>

<CardContent className="p-6">
<CardContent className="p-4 sm:p-6">
<div className="space-y-4">
<div>
<h3 className="text-xl font-bold mb-2 text-amber-900">{hackathon.hackathonName}</h3>
<h3 className="text-lg sm:text-xl font-bold mb-2 text-amber-900">{hackathon.hackathonName}</h3>
<p className="text-muted-foreground text-sm">{hackathon.description || "Web3 Hackathon"}</p>
</div>

<div className="flex items-center justify-between">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-0">
<div className="flex items-center gap-2">
<div className="p-1.5 rounded-full bg-amber-100">
<Trophy className="w-4 h-4 text-amber-600" />
</div>
<span className="font-semibold text-amber-700">{hackathon.prizePool} ETH</span>
<span className="font-semibold text-sm sm:text-base text-amber-700">{hackathon.prizePool} ETH</span>
</div>
<div className="flex items-center gap-2">
<div className="p-1.5 rounded-full bg-blue-100">
Expand All @@ -72,7 +72,7 @@ export default function HackathonCard({ hackathon, showJoinButton = true }: Hack
</div>
</div>

<div className="flex items-center justify-between">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-0">
<div className="flex items-center gap-2">
<div className="p-1.5 rounded-full bg-green-100">
<Users className="w-4 h-4 text-green-600" />
Expand All @@ -95,7 +95,7 @@ export default function HackathonCard({ hackathon, showJoinButton = true }: Hack
))}
</div>

<div className="flex items-center justify-between pt-2">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 pt-2">
<div className="flex items-center gap-2">
<Avatar className="w-6 h-6">
<AvatarFallback className="text-xs bg-amber-100 text-amber-700">
Expand All @@ -108,10 +108,10 @@ export default function HackathonCard({ hackathon, showJoinButton = true }: Hack
</div>

{showJoinButton && (
<Link href={hackathonUrl}>
<Link href={hackathonUrl} className="w-full sm:w-auto">
<Button
size="sm"
className="bg-gradient-to-r from-amber-600 to-orange-500 hover:from-amber-700 hover:to-orange-600 text-white shadow-sm hover:shadow-md transition-all"
className="w-full sm:w-auto bg-gradient-to-r from-amber-600 to-orange-500 hover:from-amber-700 hover:to-orange-600 text-white shadow-sm hover:shadow-md transition-all"
>
View Details
</Button>
Expand Down
Loading