Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions js/src/app/dashboard/Dashboard.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,26 @@ export default function DashboardPage() {
: <RefreshSubmissions schoolRegistered={schoolRegistered} />}
</Center>
<Flex direction={smallPhone ? "row" : "column"} gap={"md"}>
<Flex direction={"column"} flex={1}>
<ProblemOfTheDay />
</Flex>
<Flex direction={"column"} flex={1}>
<DashboardLeaderboard
userId={data.user.id}
userTags={data.user.tags}
/>
</Flex>
{(() => {
const leaderboardCard = (
<Flex direction={"column"} flex={1}>
<DashboardLeaderboard
userId={data.user.id}
userTags={data.user.tags}
/>
</Flex>
);
const problemOfTheDayCard = (
<Flex direction={"column"} flex={1}>
<ProblemOfTheDay />
</Flex>
);
const orderedComponents =
smallPhone ?
[problemOfTheDayCard, leaderboardCard]
: [leaderboardCard, problemOfTheDayCard];
return <>{orderedComponents}</>;
})()}
Comment thread
isabellalam12 marked this conversation as resolved.
<Flex direction={"column"} flex={1}>
<RecentSubmissions userId={data.user.id} />
</Flex>
Comment thread
isabellalam12 marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ProblemOfTheDay() {
const json = data.payload;

return (
<CodebloomCard miw={"31vw"} mih={"63vh"}>
<CodebloomCard miw="31vw" mih={{ base: "auto", md: "63vh" }}>
<Center>
<Title style={{ textAlign: "center" }} order={3}>
Problem of the day
Expand Down
Loading