Skip to content

Commit

Permalink
fix: billing text
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Dec 9, 2024
1 parent a448e5e commit fddd5ed
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Binary file modified bun.lockb
Binary file not shown.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.1",
"@tanstack/react-query": "^5.62.2",
"@tanstack/react-query-devtools": "^5.62.2",
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"@tanstack/react-table": "^8.20.5",
"@types/d3-geo": "^3.1.0",
"@types/luxon": "^3.4.2",
Expand All @@ -38,15 +38,15 @@
"react-i18next": "^15.1.3",
"react-router-dom": "^7.0.2",
"recharts": "^2.14.1",
"sonner": "^1.7.0",
"sonner": "^1.7.1",
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@types/node": "^22.10.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.1",
"@vitejs/plugin-react-swc": "^3.7.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.16.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/ServerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function ServerCard({
} else {
daysLeft = getDaysBetweenDates(
parsedData.billingDataMod.endDate,
new Date().toISOString(),
new Date(now).toISOString(),
);
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/components/ServerCardInline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function ServerCardInline({
} else {
daysLeft = getDaysBetweenDates(
parsedData.billingDataMod.endDate,
new Date().toISOString(),
new Date(now).toISOString(),
);
}
}
Expand Down Expand Up @@ -94,7 +94,11 @@ export default function ServerCardInline({
</p>
{parsedData &&
(daysLeft >= 0 ? (
<p className={cn("text-[10px] text-muted-foreground")}>
<p
className={cn("text-[10px] text-muted-foreground", {
"text-orange-600": daysLeft <= 7 && !isNeverExpire,
})}
>
剩余时间: {isNeverExpire ? "永久" : daysLeft + "天"}
</p>
) : (
Expand Down

0 comments on commit fddd5ed

Please sign in to comment.