mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -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 BetaTester from "@src/components/BetaTester";
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
return (
|
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.
|
fugiat veniam occaecat fugiat aliqua. Anim aute id magna aliqua ad ad non deserunt sunt.
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-10 flex items-top gap-x-6">
|
<div className="mt-10 flex items-top gap-x-6">
|
||||||
<a
|
<Link
|
||||||
href="#"
|
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"
|
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
|
Get Building
|
||||||
</a>
|
</Link>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default function RegisterPage() {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
username: formData.username,
|
username: formData.email,
|
||||||
firstName: formData.firstName,
|
firstName: formData.firstName,
|
||||||
email: formData.email,
|
email: formData.email,
|
||||||
password: formData.password,
|
password: formData.password,
|
||||||
@@ -60,17 +60,6 @@ export default function RegisterPage() {
|
|||||||
</div>
|
</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>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700">First Name</label>
|
<label className="block text-sm font-medium text-gray-700">First Name</label>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export default function SignInPage() {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setError('');
|
setError('');
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/auth/signup', {
|
const response = await fetch('/api/auth/signup', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -28,12 +27,15 @@ export default function SignInPage() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
|
console.log('Login successful');
|
||||||
router.push('/');
|
router.push('/');
|
||||||
} else {
|
} else {
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
console.log('Login failed:', data.error || 'Something went wrong');
|
||||||
setError(data.error || 'Something went wrong');
|
setError(data.error || 'Something went wrong');
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.log('Login failed: Failed to create account');
|
||||||
setError('Failed to create account');
|
setError('Failed to create account');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user