Skip to content

Commit

Permalink
Added "try our assistant" to dashboard to avoid confusing new users (#…
Browse files Browse the repository at this point in the history
…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"
  • Loading branch information
yk committed Apr 18, 2023
1 parent fd864ec commit 533c53f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion website/src/pages/dashboard.tsx
@@ -1,4 +1,4 @@
import { Card, CardBody, Flex } from "@chakra-ui/react";
import { Button, Card, CardBody, Flex, Heading } from "@chakra-ui/react";
import Head from "next/head";
import { useTranslation } from "next-i18next";
import { useMemo } from "react";
Expand All @@ -7,9 +7,11 @@ import { getDashboardLayout } from "src/components/Layout";
import { get } from "src/lib/api";
import { AvailableTasks, TaskCategory } from "src/types/Task";
export { getDefaultServerSideProps as getStaticProps } from "src/lib/defaultServerSideProps";
import Link from "next/link";
import { XPBar } from "src/components/Account/XPBar";
import { TaskCategoryItem } from "src/components/Dashboard/TaskOption";
import { useCurrentLocale } from "src/hooks/locale/useCurrentLocale";
import { getEnv } from "src/lib/browserEnv";
import { API_ROUTES } from "src/lib/routes";
import useSWR from "swr";

Expand All @@ -33,6 +35,18 @@ const Dashboard = () => {
</Head>
<Flex direction="column" gap="10">
<WelcomeCard />

{getEnv().ENABLE_CHAT && (
<Flex direction="column" gap={4}>
<Heading size="lg">{t("index:try_our_assistant")}</Heading>
<Link href="/chat" aria-label="Chat">
<Button variant="solid" colorScheme="blue" px={5} py={6}>
{t("index:try_our_assistant")}
</Button>
</Link>
</Flex>
)}

<TaskOption content={availableTaskTypes} />
<Card>
<CardBody>
Expand Down

0 comments on commit 533c53f

Please sign in to comment.