Skip to content
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

picture and signup form #28

Merged
merged 1 commit into from
Dec 24, 2023
Merged
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
2 changes: 1 addition & 1 deletion frontend/.env.local
Original file line number Diff line number Diff line change
@@ -1 +1 @@
API_URL=http://localhost:8000
API_URL=https://carecompanion-production-a0ae.up.railway.app
Binary file added frontend/public/care-bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 20 additions & 16 deletions frontend/src/pages/auth/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"use client";

import { useState } from "react";
import "./index.css";
import { useRouter } from "next/router";

const auth = () => {
const [isSignup, setIsSignup] = useState(false);
const router = useRouter();

async function onSubmit(event) {
Expand All @@ -30,17 +32,21 @@ const auth = () => {
}
}

function signupClick() {
setIsSignup(!isSignup);
}

return (
<>
<div className="flex min-h-full flex-1 flex-col justify-center px-6 py-12 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-sm">
<img
className="mx-auto h-10 w-auto"
src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600"
className="mx-auto w-40"
src="./care-bot.png"
alt="Your Company"
/>
<h2 className="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900">
Sign in to your account
{isSignup ? "Sign up" : "Sign in to your account"}
</h2>
</div>

Expand Down Expand Up @@ -73,14 +79,14 @@ const auth = () => {
>
Password
</label>
<div className="text-sm">
{/* <div className="text-sm">
<a
href="#"
className="font-semibold text-indigo-600 hover:text-indigo-500"
>
Forgot password?
</a>
</div>
</div> */}
</div>
<div className="mt-2">
<input
Expand All @@ -99,20 +105,18 @@ const auth = () => {
type="submit"
className="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
Sign in
Submit
</button>

<button
onClick={signupClick}
type="button"
className="flex mt-2 w-full justify-center rounded-md bg-gray px-3 py-1.5 text-sm font-semibold leading-6 text-black shadow-sm hover:bg-gray-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
{isSignup ? "Sign in" : "Sign up"}
</button>
</div>
</form>

<p className="mt-10 text-center text-sm text-gray-500">
Not a member?{" "}
<a
href="#"
className="font-semibold leading-6 text-indigo-600 hover:text-indigo-500"
>
Start a 14 day free trial
</a>
</p>
</div>
</div>
</>
Expand Down
Loading