Merge pull request #306 from LAION-AI/156-resolve-merge-issues

Fixing merge issues with website and backend
This commit is contained in:
Yannic Kilcher
2023-01-03 10:25:57 +01:00
committed by GitHub
6 changed files with 5 additions and 33 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ services:
# Use `docker compose up frontend-dev --build --attach-dependencies` to start all services needed to work on the frontend. # Use `docker compose up frontend-dev --build --attach-dependencies` to start all services needed to work on the frontend.
frontend-dev: frontend-dev:
image: sverrirab/sleep image: sverrirab/sleep
depends_on: [db, webdb, adminer, maildev, backend] depends_on: [db, webdb, adminer, maildev, backend, redis]
# This DB is for the FastAPI Backend. # This DB is for the FastAPI Backend.
db: db:
-11
View File
@@ -22,17 +22,6 @@ export function Footer() {
</div> </div>
<nav className="flex justify-center gap-20"> <nav className="flex justify-center gap-20">
<div className="flex flex-col text-sm leading-7">
<b>Information</b>
<div className="flex flex-col leading-5">
<Link href="#" aria-label="Our Team" className="hover:underline underline-offset-2">
Our Team
</Link>
<Link href="/#join-us" aria-label="Join Us" className="hover:underline underline-offset-2">
Join Us
</Link>
</div>
</div>
<nav className="flex justify-center gap-20"> <nav className="flex justify-center gap-20">
<div className="flex flex-col text-sm leading-7"> <div className="flex flex-col text-sm leading-7">
<b>Legal</b> <b>Legal</b>
-4
View File
@@ -7,7 +7,6 @@ import { useSession } from "next-auth/react";
import { FaUser } from "react-icons/fa"; import { FaUser } from "react-icons/fa";
import { ColorModeIconToggle } from "../UI/ColorModeIconToggle"; import { ColorModeIconToggle } from "../UI/ColorModeIconToggle";
import { NavLinks } from "./NavLinks";
import { UserMenu } from "./UserMenu"; import { UserMenu } from "./UserMenu";
function MenuIcon(props) { function MenuIcon(props) {
@@ -69,9 +68,6 @@ export function Header(props) {
<Image src="/images/logos/logo.svg" className="mx-auto object-fill" width="50" height="50" alt="logo" /> <Image src="/images/logos/logo.svg" className="mx-auto object-fill" width="50" height="50" alt="logo" />
<span className="text-2xl font-bold ml-3">Open Assistant</span> <span className="text-2xl font-bold ml-3">Open Assistant</span>
</Link> </Link>
<div className="hidden lg:flex lg:gap-10">
<NavLinks />
</div>
</div> </div>
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<Popover className="lg:hidden"> <Popover className="lg:hidden">
@@ -53,7 +53,7 @@ const handler = async (req, res) => {
}); });
// Update the backend with our Task ID // Update the backend with our Task ID
const ackRes = await fetch(`${process.env.FASTAPI_URL}/api/v1/tasks/${task.id}/ack`, { await fetch(`${process.env.FASTAPI_URL}/api/v1/tasks/${task.id}/ack`, {
method: "POST", method: "POST",
headers: { headers: {
"X-API-Key": process.env.FASTAPI_KEY, "X-API-Key": process.env.FASTAPI_KEY,
@@ -64,8 +64,6 @@ const handler = async (req, res) => {
}), }),
}); });
ackRes; // calling this only to get rid of the unused variable warning... not sure if anything is intended to be done with ackRes
// Send the results to the client. // Send the results to the client.
res.status(200).json(registeredTask); res.status(200).json(registeredTask);
}; };
+1 -5
View File
@@ -7,8 +7,7 @@ import prisma from "src/lib/prismadb";
* This implicity does a few things: * This implicity does a few things:
* 1) Stores the answer with the Task Backend. * 1) Stores the answer with the Task Backend.
* 2) Records the new task in our local database. * 2) Records the new task in our local database.
* 3) (TODO) Acks the new task with our local task ID to the Task Backend. * 3) Returns the newly created task to the client.
* 4) Returns the newly created task to the client.
*/ */
const handler = async (req, res) => { const handler = async (req, res) => {
const token = await getToken({ req }); const token = await getToken({ req });
@@ -69,9 +68,6 @@ const handler = async (req, res) => {
}, },
}); });
// TODO: Ack the task with the Task Backend using the newly created local
// task ID.
// Send the next task in the sequence to the client. // Send the next task in the sequence to the client.
res.status(200).json(newRegisteredTask); res.status(200).json(newRegisteredTask);
}; };
+2 -9
View File
@@ -99,22 +99,15 @@ function Signin({ csrfToken, providers }) {
</Stack> </Stack>
<div className="pt-10 text-center"> <div className="pt-10 text-center">
By signing up you agree to our <br></br> By signing up you agree to our <br></br>
<Link href="#" aria-label="Terms of Service" className="hover:underline underline-offset-4"> <Link href="/terms-of-service" aria-label="Terms of Service" className="hover:underline underline-offset-4">
<b>Terms of Service</b> <b>Terms of Service</b>
</Link>{" "} </Link>{" "}
and{" "} and{" "}
<Link href="#" aria-label="Terms of Use" className="hover:underline underline-offset-4"> <Link href="/privacy-policy" aria-label="Privacy Policy" className="hover:underline underline-offset-4">
<b>Privacy Policy</b> <b>Privacy Policy</b>
</Link> </Link>
. .
</div> </div>
<hr className="mt-14 mb-4 h-px bg-gray-200 border-0" />
<div className="text-center">
Already have an account?{" "}
<Link href="#" aria-label="Log In" className="hover:underline underline-offset-4">
<b>Log In</b>
</Link>
</div>
</AuthLayout> </AuthLayout>
</div> </div>
); );