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
56 changes: 43 additions & 13 deletions js/src/app/dashboard/Dashboard.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default function DashboardPage() {
/>
);
}

return (
<>
<DocumentTitle title={`CodeBloom - Dashboard`} />
Expand All @@ -62,19 +63,48 @@ export default function DashboardPage() {
<OnboardingLeetcodeUser />
: <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>
<Flex direction={"column"} flex={1}>
<RecentSubmissions userId={data.user.id} />
</Flex>
<Flex
direction={smallPhone ? "row" : "column"}
gap={"md"}
align={smallPhone ? "flex-start" : "stretch"}
>
{smallPhone ?
<>
{
<Flex direction={"column"}>
<ProblemOfTheDay />
</Flex>
}
{
<Flex direction={"column"} flex={1}>
<DashboardLeaderboard
userId={data.user.id}
userTags={data.user.tags}
/>
</Flex>
}
</>
: <>
{
<Flex direction={"column"} flex={1}>
<DashboardLeaderboard
userId={data.user.id}
userTags={data.user.tags}
/>
</Flex>
}
{
<Flex direction={"column"}>
<ProblemOfTheDay />
</Flex>
}
</>
}
<div>
<Flex direction={"column"} flex={1}>
<RecentSubmissions userId={data.user.id} />
</Flex>
</div>
</Flex>
</Flex>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function ProblemOfTheDay() {
const { data, status } = useFetchPotdQuery();

const renderStatusCard = (message: string) => (
<CodebloomCard miw={"31vw"} mih={"63vh"}>
<CodebloomCard miw={"31vw"} mih={{ base: "auto", md: "63vh" }}>
<Flex
direction={"row"}
justify={"center"}
Expand Down 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" }}>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
<Center>
<Title style={{ textAlign: "center" }} order={3}>
Problem of the day
Expand All @@ -55,7 +55,7 @@ export default function ProblemOfTheDay() {
align={"center"}
justify={"center"}
w={"100%"}
h={"100%"}
h={{ base: "auto", md: "100%" }}
>
<Title style={{ textAlign: "center" }} order={4}>
{json.title}
Expand Down
Loading