mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-30 16:40:05 +08:00
pre-commit lint
This commit is contained in:
@@ -4,22 +4,29 @@ import Link from "next/link";
|
||||
import { Container, Text, useColorModeValue } from "@chakra-ui/react";
|
||||
|
||||
export function Footer() {
|
||||
|
||||
return (
|
||||
<footer>
|
||||
<Container className="flex justify-evenly py-10 px-10 border-t">
|
||||
<div className="flex items-center pr-8">
|
||||
<Link href="/" aria-label="Home" className="flex items-center">
|
||||
<Image src="/images/logos/logo.svg" className="mx-auto object-fill" width="52" height="52" alt="logo" />
|
||||
</Link>
|
||||
<div className="flex items-center pr-8">
|
||||
<Link href="/" aria-label="Home" className="flex items-center">
|
||||
<Image src="/images/logos/logo.svg" className="mx-auto object-fill" width="52" height="52" alt="logo" />
|
||||
</Link>
|
||||
|
||||
<div className="ml-2">
|
||||
<p className="text-base font-bold">
|
||||
Open Assistant
|
||||
</p>
|
||||
<p className="text-sm">
|
||||
Conversational AI for everyone.
|
||||
</p>
|
||||
<div className="ml-2">
|
||||
<p className="text-base font-bold">Open Assistant</p>
|
||||
<p className="text-sm">Conversational AI for everyone.</p>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
@@ -29,48 +36,36 @@ export function Footer() {
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
<div className="flex flex-col text-sm leading-7">
|
||||
<b>Connect</b>
|
||||
<div className="flex flex-col leading-5">
|
||||
<Link
|
||||
href="https://github.com/LAION-AI/Open-Assistant"
|
||||
rel="noopener noreferrer nofollow"
|
||||
target="_blank"
|
||||
aria-label="Privacy Policy"
|
||||
className="hover:underline underline-offset-2"
|
||||
>
|
||||
Github
|
||||
</Link>
|
||||
<Link
|
||||
href="https://discord.gg/pXtnYk9c"
|
||||
rel="noopener noreferrer nofollow"
|
||||
target="_blank"
|
||||
aria-label="Terms of Service"
|
||||
className="hover:underline underline-offset-2"
|
||||
>
|
||||
Discord
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div className="flex flex-col text-sm leading-7">
|
||||
<b>Connect</b>
|
||||
<div className="flex flex-col leading-5">
|
||||
<Link
|
||||
href="https://github.com/LAION-AI/Open-Assistant"
|
||||
rel="noopener noreferrer nofollow"
|
||||
target="_blank"
|
||||
aria-label="Privacy Policy"
|
||||
className="hover:underline underline-offset-2"
|
||||
>
|
||||
Github
|
||||
</Link>
|
||||
<Link
|
||||
href="https://discord.gg/pXtnYk9c"
|
||||
rel="noopener noreferrer nofollow"
|
||||
target="_blank"
|
||||
aria-label="Terms of Service"
|
||||
className="hover:underline underline-offset-2"
|
||||
>
|
||||
Discord
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</Container>
|
||||
</footer>
|
||||
);
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
import { Container, useColorModeValue } from "@chakra-ui/react";
|
||||
|
||||
|
||||
export const TwoColumns = ({ children }: { children: React.ReactNode[] }) => {
|
||||
if (!Array.isArray(children) || children.length !== 2) {
|
||||
throw new Error("TwoColumns expects 2 children");
|
||||
}
|
||||
const bg = useColorModeValue("white", "gray.700")
|
||||
const bg = useColorModeValue("white", "gray.700");
|
||||
const [first, second] = children;
|
||||
|
||||
return (
|
||||
<Container className="mb-8 lt-lg:mb-12 grid lg:gap-x-12 lg:grid-cols-2">
|
||||
<Container bg={bg} className="rounded-lg shadow-lg h-full block p-6">{first}</Container>
|
||||
<Container bg={bg} className="rounded-lg shadow-lg h-full block p-6 mt-6 lg:mt-0">{second}</Container>
|
||||
<Container bg={bg} className="rounded-lg shadow-lg h-full block p-6">
|
||||
{first}
|
||||
</Container>
|
||||
<Container bg={bg} className="rounded-lg shadow-lg h-full block p-6 mt-6 lg:mt-0">
|
||||
{second}
|
||||
</Container>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Switch, useColorMode } from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
|
||||
|
||||
const ColorModeSwitch = () => {
|
||||
const { colorMode, toggleColorMode } = useColorMode();
|
||||
return (
|
||||
|
||||
@@ -20,7 +20,7 @@ const RankAssistantReplies = () => {
|
||||
* The best reply will have index 0, and the worst is the last.
|
||||
*/
|
||||
const [ranking, setRanking] = useState<number[]>([]);
|
||||
const bg = useColorModeValue("gray.100", "gray.800")
|
||||
const bg = useColorModeValue("gray.100", "gray.800");
|
||||
const { isLoading } = useSWRImmutable("/api/new_task/rank_assistant_replies", fetcher, {
|
||||
onSuccess: (data) => {
|
||||
setTasks([data]);
|
||||
|
||||
@@ -21,7 +21,7 @@ const RankInitialPrompts = () => {
|
||||
* The best prompt will have index 0, and the worst is the last.
|
||||
*/
|
||||
const [ranking, setRanking] = useState<number[]>([]);
|
||||
const bg = useColorModeValue("gray.100", "gray.800")
|
||||
const bg = useColorModeValue("gray.100", "gray.800");
|
||||
|
||||
const { isLoading } = useSWRImmutable("/api/new_task/rank_initial_prompts", fetcher, {
|
||||
onSuccess: (data) => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
export const colors = {
|
||||
light: {
|
||||
bg: "gray.100",
|
||||
text: "black"
|
||||
text: "black",
|
||||
},
|
||||
dark: {
|
||||
bg: "gray.900",
|
||||
text: "white"
|
||||
text: "white",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { color, defineStyle, defineStyleConfig, transition } from "@chakra-ui/styled-system"
|
||||
import { colors } from "../colors"
|
||||
import { color, defineStyle, defineStyleConfig, transition } from "@chakra-ui/styled-system";
|
||||
import { colors } from "../colors";
|
||||
|
||||
const baseStyle = defineStyle(({colorMode}) => ({
|
||||
const baseStyle = defineStyle(({ colorMode }) => ({
|
||||
minWidth: "100%",
|
||||
bg: colorMode === "light" ? colors.light.bg : colors.dark.bg,
|
||||
transition: "background-color 200ms cubic-bezier(0.4, 0, 1, 1)",
|
||||
color: colorMode === "light" ? colors.light.text : colors.dark.text,
|
||||
}))
|
||||
}));
|
||||
|
||||
export const containerTheme = defineStyleConfig({
|
||||
baseStyle,
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user