Skip to content

Commit 533c53f

Browse files
authored
Added "try our assistant" to dashboard to avoid confusing new users (LAION-AI#2694)
needs to be made prettier still, but I suspect lots of users come to the website and don't know where to chat and might go to "create initial prompt"
1 parent fd864ec commit 533c53f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎website/src/pages/dashboard.tsx‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Card, CardBody, Flex } from "@chakra-ui/react";
1+
import { Button, Card, CardBody, Flex, Heading } from "@chakra-ui/react";
22
import Head from "next/head";
33
import { useTranslation } from "next-i18next";
44
import { useMemo } from "react";
@@ -7,9 +7,11 @@ import { getDashboardLayout } from "src/components/Layout";
77
import { get } from "src/lib/api";
88
import { AvailableTasks, TaskCategory } from "src/types/Task";
99
export { getDefaultServerSideProps as getStaticProps } from "src/lib/defaultServerSideProps";
10+
import Link from "next/link";
1011
import { XPBar } from "src/components/Account/XPBar";
1112
import { TaskCategoryItem } from "src/components/Dashboard/TaskOption";
1213
import { useCurrentLocale } from "src/hooks/locale/useCurrentLocale";
14+
import { getEnv } from "src/lib/browserEnv";
1315
import { API_ROUTES } from "src/lib/routes";
1416
import useSWR from "swr";
1517

@@ -33,6 +35,18 @@ const Dashboard = () => {
3335
</Head>
3436
<Flex direction="column" gap="10">
3537
<WelcomeCard />
38+
39+
{getEnv().ENABLE_CHAT && (
40+
<Flex direction="column" gap={4}>
41+
<Heading size="lg">{t("index:try_our_assistant")}</Heading>
42+
<Link href="/chat" aria-label="Chat">
43+
<Button variant="solid" colorScheme="blue" px={5} py={6}>
44+
{t("index:try_our_assistant")}
45+
</Button>
46+
</Link>
47+
</Flex>
48+
)}
49+
3650
<TaskOption content={availableTaskTypes} />
3751
<Card>
3852
<CardBody>

0 commit comments

Comments
 (0)