mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-05 18:26:45 -05:00
Merge branch 'develop' of ssh://gitea.gofwd.group:2225/dstrawsb/ballistic-builder into develop
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import BetaTester from "@src/components/BetaTester";
|
||||
import Link from 'next/link';
|
||||
|
||||
export default async function Home() {
|
||||
return (
|
||||
@@ -38,12 +39,12 @@ export default async function Home() {
|
||||
fugiat veniam occaecat fugiat aliqua. Anim aute id magna aliqua ad ad non deserunt sunt.
|
||||
</p>
|
||||
<div className="mt-10 flex items-top gap-x-6">
|
||||
<a
|
||||
href="#"
|
||||
<Link
|
||||
href="/Builder"
|
||||
className="up rounded-md bg-lime-800 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-lime-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
|
||||
>
|
||||
Get Building
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function RegisterPage() {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
username: formData.username,
|
||||
username: formData.email,
|
||||
firstName: formData.firstName,
|
||||
email: formData.email,
|
||||
password: formData.password,
|
||||
@@ -60,17 +60,6 @@ export default function RegisterPage() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700">USer Name</label>
|
||||
<input
|
||||
type="text"
|
||||
required
|
||||
className="mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"
|
||||
value={formData.username}
|
||||
onChange={(e) => setFormData({...formData, username: e.target.value})}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700">First Name</label>
|
||||
<input
|
||||
|
||||
@@ -16,7 +16,6 @@ export default function SignInPage() {
|
||||
e.preventDefault();
|
||||
setError('');
|
||||
|
||||
|
||||
try {
|
||||
const response = await fetch('/api/auth/signup', {
|
||||
method: 'POST',
|
||||
@@ -28,12 +27,15 @@ export default function SignInPage() {
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
console.log('Login successful');
|
||||
router.push('/');
|
||||
} else {
|
||||
const data = await response.json();
|
||||
console.log('Login failed:', data.error || 'Something went wrong');
|
||||
setError(data.error || 'Something went wrong');
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('Login failed: Failed to create account');
|
||||
setError('Failed to create account');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user