Skip to content

Commit

Permalink
Removed duplicate Box components
Browse files Browse the repository at this point in the history
  • Loading branch information
Klotske committed Jan 7, 2023
1 parent d3a0bd4 commit 5524db5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 35 deletions.
7 changes: 2 additions & 5 deletions website/src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Box } from "@chakra-ui/react";
import Head from "next/head";

import { getDashboardLayout } from "src/components/Layout";
Expand All @@ -11,10 +10,8 @@ const Dashboard = () => {
<title>Dashboard - Open Assistant</title>
<meta name="description" content="Chat with Open Assistant and provide feedback." />
</Head>
<Box className="flex flex-col overflow-auto p-6 sm:pl-0 gap-14">
<TaskOption />
<LeaderboardTable />
</Box>
<TaskOption />
<LeaderboardTable />
</>
);
};
Expand Down
58 changes: 28 additions & 30 deletions website/src/pages/messages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,36 @@ const MessagesDashboard = () => {
<title>Messages - Open Assistant</title>
<meta name="description" content="Chat with Open Assistant and provide feedback." />
</Head>
<Box className="flex flex-col overflow-auto p-6 sm:pl-0 gap-14">
<SimpleGrid columns={[1, 1, 1, 2]} gap={4}>
<Box>
<Text className="text-2xl font-bold" pb="4">
Most recent messages
</Text>
<Box
backgroundColor={boxBgColor}
boxShadow="base"
dropShadow={boxAccentColor}
borderRadius="xl"
className="p-6 shadow-sm"
>
{isLoadingAll ? <CircularProgress isIndeterminate /> : <MessageTable messages={messages} />}
</Box>
<SimpleGrid columns={[1, 1, 1, 2]} gap={4}>
<Box>
<Text className="text-2xl font-bold" pb="4">
Most recent messages
</Text>
<Box
backgroundColor={boxBgColor}
boxShadow="base"
dropShadow={boxAccentColor}
borderRadius="xl"
className="p-6 shadow-sm"
>
{isLoadingAll ? <CircularProgress isIndeterminate /> : <MessageTable messages={messages} />}
</Box>
<Box>
<Text className="text-2xl font-bold" pb="4">
Your most recent messages
</Text>
<Box
backgroundColor={boxBgColor}
boxShadow="base"
dropShadow={boxAccentColor}
borderRadius="xl"
className="p-6 shadow-sm"
>
{isLoadingUser ? <CircularProgress isIndeterminate /> : <MessageTable messages={userMessages} />}
</Box>
</Box>
<Box>
<Text className="text-2xl font-bold" pb="4">
Your most recent messages
</Text>
<Box
backgroundColor={boxBgColor}
boxShadow="base"
dropShadow={boxAccentColor}
borderRadius="xl"
className="p-6 shadow-sm"
>
{isLoadingUser ? <CircularProgress isIndeterminate /> : <MessageTable messages={userMessages} />}
</Box>
</SimpleGrid>
</Box>
</Box>
</SimpleGrid>
</>
);
};
Expand Down

0 comments on commit 5524db5

Please sign in to comment.