-
Notifications
You must be signed in to change notification settings - Fork 0
Bsl 24 shared UI components #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shreyaanchhabra
wants to merge
5
commits into
main
Choose a base branch
from
bsl-24-SharedUI-Components
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c297bee
Added about and leaders page routes
1c1f33c
Created reusable leader card and tabswitch components
9bda0bf
Merge branch 'main' into bsl-24-SharedUI-Components
shreyaanchhabra 93e33bd
UI changes
Thaarak 00a4d13
Fixed the issue of the leader page not showing
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,65 +1,59 @@ | ||
| "use client"; | ||
|
|
||
| import { useState } from "react"; | ||
| import { Input } from "@/components/ui/input"; | ||
| import { Label } from "@/components/ui/label"; | ||
| import { Button } from "@/components/ui/button"; | ||
|
|
||
| export default function AdminLoginPage() { | ||
| const [email, setEmail] = useState(""); | ||
| const [password, setPassword] = useState(""); | ||
| const [email, setEmail] = useState(""); | ||
| const [password, setPassword] = useState(""); | ||
|
|
||
| const handleSubmit = (e: React.FormEvent) => { | ||
| e.preventDefault(); | ||
| console.log({ email, password }); | ||
| }; | ||
| const handleSubmit = (e: React.FormEvent) => { | ||
| e.preventDefault(); | ||
| console.log({ email, password }); | ||
| }; | ||
|
|
||
| return ( | ||
| <div className="flex min-h-screen items-center justify-center bg-background"> | ||
| <div className="w-full max-w-md space-y-8 rounded-lg border border-border bg-card p-8 shadow-sm"> | ||
| <div className="text-center"> | ||
| <h1 className="text-2xl font-bold tracking-tight">Admin Login</h1> | ||
| <p className="mt-2 text-sm text-muted-foreground"> | ||
| Sign in to access the admin dashboard | ||
| </p> | ||
| </div> | ||
| return ( | ||
| <div className="flex min-h-screen items-center justify-center bg-background"> | ||
| <div className="w-full max-w-md space-y-8 rounded-lg border border-border bg-card p-8 shadow-sm"> | ||
| <div className="text-center"> | ||
| <h1 className="text-2xl font-bold tracking-tight">Admin Login</h1> | ||
| <p className="mt-2 text-sm text-muted-foreground"> | ||
| Sign in to access the admin dashboard | ||
| </p> | ||
| </div> | ||
|
|
||
| <form onSubmit={handleSubmit} className="space-y-6"> | ||
| <div className="space-y-2"> | ||
| <label htmlFor="email" className="text-sm font-medium"> | ||
| </label> | ||
| <input | ||
| id="email" | ||
| type="email" | ||
| value={email} | ||
| onChange={(e) => setEmail(e.target.value)} | ||
| placeholder="admin@example.com" | ||
| required | ||
| className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" | ||
| /> | ||
| </div> | ||
| <form onSubmit={handleSubmit} className="space-y-6"> | ||
| <div className="space-y-2"> | ||
| <Label htmlFor="email">Email</Label> | ||
| <Input | ||
| id="email" | ||
| type="email" | ||
| value={email} | ||
| onChange={(e) => setEmail(e.target.value)} | ||
| placeholder="admin@example.com" | ||
| required | ||
| /> | ||
| </div> | ||
|
|
||
| <div className="space-y-2"> | ||
| <label htmlFor="password" className="text-sm font-medium"> | ||
| Password | ||
| </label> | ||
| <input | ||
| id="password" | ||
| type="password" | ||
| value={password} | ||
| onChange={(e) => setPassword(e.target.value)} | ||
| placeholder="••••••••" | ||
| required | ||
| className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" | ||
| /> | ||
| </div> | ||
| <div className="space-y-2"> | ||
| <Label htmlFor="password">Password</Label> | ||
| <Input | ||
| id="password" | ||
| type="password" | ||
| value={password} | ||
| onChange={(e) => setPassword(e.target.value)} | ||
| placeholder="••••••••" | ||
| required | ||
| /> | ||
| </div> | ||
|
|
||
| <button | ||
| type="submit" | ||
| className="inline-flex h-10 w-full items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" | ||
| > | ||
| Sign In | ||
| </button> | ||
| </form> | ||
| </div> | ||
| </div> | ||
| ); | ||
| <Button type="submit" className="w-full"> | ||
| Sign In | ||
| </Button> | ||
| </form> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,6 +2,10 @@ | |
|
|
||
| import { useState } from "react"; | ||
| import PublicLayout from "@/components/layout/PublicLayout"; | ||
| import { Input } from "@/components/ui/input"; | ||
| import { Textarea } from "@/components/ui/textarea"; | ||
| import { Label } from "@/components/ui/label"; | ||
| import { Button } from "@/components/ui/button"; | ||
|
|
||
| type StartupFormState = { | ||
| name: string; | ||
|
|
@@ -32,79 +36,63 @@ export default function StartupApplyPage() { | |
| <div className="mx-auto max-w-2xl px-6 py-12"> | ||
| <h1 className="text-3xl font-semibold">Startup Application</h1> | ||
| <p className="mt-2 text-gray-600"> | ||
| UI only for now — submitting will log your inputs to the console. | ||
| Tell us more about your startup! | ||
| </p> | ||
|
|
||
| <form onSubmit={handleSubmit} className="mt-8 space-y-6"> | ||
| <div className="space-y-2"> | ||
| <label className="block font-medium" htmlFor="name"> | ||
| Startup Name | ||
| </label> | ||
| <input | ||
| id="name" | ||
| type="text" | ||
| value={form.name} | ||
| onChange={(e) => updateField("name", e.target.value)} | ||
| className="w-full rounded-md border px-3 py-2" | ||
| placeholder="e.g., Startup Labs" | ||
| required | ||
| /> | ||
| </div> | ||
| <div className="space-y-2"> | ||
| <Label htmlFor="description">Tell us more about your startup!</Label> | ||
| <Textarea | ||
| id="description" | ||
| value={form.description} | ||
| onChange={(e) => updateField("description", e.target.value)} | ||
| placeholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." | ||
| rows={5} | ||
| required | ||
| /> | ||
| </div> | ||
|
|
||
| <div className="space-y-2"> | ||
| <label className="block font-medium" htmlFor="description"> | ||
| Description | ||
| </label> | ||
| <textarea | ||
| id="description" | ||
| value={form.description} | ||
| onChange={(e) => updateField("description", e.target.value)} | ||
| className="w-full rounded-md border px-3 py-2" | ||
| placeholder="What does your startup do?" | ||
| rows={5} | ||
| required | ||
| /> | ||
| </div> | ||
| <div className="space-y-2"> | ||
| <Label htmlFor="name">Link to pitch deck</Label> | ||
| <Input | ||
| id="name" | ||
| type="url" | ||
| value={form.name} | ||
| onChange={(e) => updateField("name", e.target.value)} | ||
| placeholder="Loremipsumdolorsitamet.com" | ||
| required | ||
| /> | ||
| </div> | ||
|
|
||
| <div className="space-y-2"> | ||
| <label className="block font-medium" htmlFor="fundingGoal"> | ||
| Funding Goal | ||
| </label> | ||
| <input | ||
| id="fundingGoal" | ||
| type="text" | ||
| value={form.fundingGoal} | ||
| onChange={(e) => updateField("fundingGoal", e.target.value)} | ||
| className="w-full rounded-md border px-3 py-2" | ||
| placeholder="e.g., $50,000" | ||
| required | ||
| /> | ||
| </div> | ||
| <div className="space-y-2"> | ||
| <Label htmlFor="fundingGoal">Funding goal ($)</Label> | ||
| <Input | ||
| id="fundingGoal" | ||
| type="text" | ||
| value={form.fundingGoal} | ||
| onChange={(e) => updateField("fundingGoal", e.target.value)} | ||
| placeholder="100,000,000" | ||
| required | ||
| /> | ||
| </div> | ||
|
|
||
| <div className="space-y-2"> | ||
| <label className="block font-medium" htmlFor="contact"> | ||
| Contact (email or phone) | ||
| </label> | ||
| <input | ||
| id="contact" | ||
| type="text" | ||
| value={form.contact} | ||
| onChange={(e) => updateField("contact", e.target.value)} | ||
| className="w-full rounded-md border px-3 py-2" | ||
| placeholder="you@company.com" | ||
| required | ||
| /> | ||
| </div> | ||
| <div className="space-y-2"> | ||
| <Label htmlFor="contact">Link to external funding site</Label> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same issue as above form.contact is now storing a URL but is still named contact. If you need a funding link field, add it as a new field (fundingUrl) to the form state. Don't reuse contact for a different purpose. |
||
| <Input | ||
| id="contact" | ||
| type="url" | ||
| value={form.contact} | ||
| onChange={(e) => updateField("contact", e.target.value)} | ||
| placeholder="Loremipsumdolorsitamet.com" | ||
| required | ||
| /> | ||
| </div> | ||
|
|
||
| <button | ||
| type="submit" | ||
| className="rounded-md border px-4 py-2 font-medium hover:bg-gray-50" | ||
| > | ||
| Submit | ||
| </button> | ||
| </form> | ||
| <div className="flex justify-center pt-4"> | ||
| <Button type="submit">Apply</Button> | ||
| </div> | ||
| </form> | ||
| </div> | ||
| </PublicLayout> | ||
| ); | ||
| } | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the "name" state field ID no longer makes sense here since it isnow collecting a URL, not the startup's name.
Whch means the actual startup name is now missing from the form entirely. This should either be a new deckUrl field added to StartupFormState, keeping name as-is for the startup name, or if you're changing the form fields, the state type needs to be updated to match.