Skip to content

Commit

Permalink
uplift stat cards
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxn committed Nov 1, 2023
1 parent ba43703 commit 54b6e29
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/Dashboard/StatCards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from "react";
import moment from "moment";
import { NumericFormat } from "react-number-format";

import Box from "@mui/joy/Box";
import Tooltip from "@mui/joy/Tooltip";
import Button from "@mui/joy/Button";
import Chip from "@mui/joy/Chip";
Expand Down Expand Up @@ -47,7 +48,7 @@ export const SimpleNumberFormat = React.memo(({ showChange = false, value }) =>

function StatCardChip({ value, icon = false, color = "neutral", variant = "solid" }) {
return (
<Typography color={color} sx={{ display: "flex", alignItems: "center", gap: 1 }}>
<Box color={color} sx={{ display: "flex", alignItems: "center", gap: 1 }}>
<Chip
size="lg"
variant={variant}
Expand All @@ -59,7 +60,7 @@ function StatCardChip({ value, icon = false, color = "neutral", variant = "solid
>
{value}
</Chip>
</Typography>
</Box>
);
}

Expand Down Expand Up @@ -447,7 +448,11 @@ export function GrowthCard() {
<>
Growth Stats
<Tooltip title="Data from Lemmyverse.net" variant="outlined" placement="top">
<Button size="sm" variant="outlined" onClick={() => window.open("https://lemmyverse.net")}>
<Button
size="sm"
variant="outlined"
onClick={() => window.open(`https://lemmyverse.net/instance/${baseUrl}`)}
>
<OpenInNewIcon size="sm" />
</Button>
</Tooltip>
Expand Down

0 comments on commit 54b6e29

Please sign in to comment.