mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-05 05:00:07 +00:00
fix: remaining days
This commit is contained in:
@@ -5,7 +5,12 @@ export default function PlanInfo({ parsedData }: { parsedData: PublicNoteData })
|
||||
return null
|
||||
}
|
||||
|
||||
const extraList = parsedData.planDataMod.extra.split(",").length > 1 ? parsedData.planDataMod.extra.split(",") : parsedData.planDataMod.extra.split(",")[0] === "" ? [] : [parsedData.planDataMod.extra]
|
||||
const extraList =
|
||||
parsedData.planDataMod.extra.split(",").length > 1
|
||||
? parsedData.planDataMod.extra.split(",")
|
||||
: parsedData.planDataMod.extra.split(",")[0] === ""
|
||||
? []
|
||||
: [parsedData.planDataMod.extra]
|
||||
|
||||
return (
|
||||
<section className="flex gap-1 items-center flex-wrap mt-0.5">
|
||||
@@ -51,26 +56,26 @@ export default function PlanInfo({ parsedData }: { parsedData: PublicNoteData })
|
||||
"text-[9px] bg-blue-600 text-blue-200 dark:bg-blue-800 dark:text-blue-300 w-fit rounded-[5px] px-[3px] py-[1.5px]",
|
||||
)}
|
||||
>
|
||||
{parsedData.planDataMod.networkRoute.split(",").map((route,index) => {
|
||||
return route + (index === parsedData.planDataMod!.networkRoute.split(",").length - 1 ? "" : "|")
|
||||
{parsedData.planDataMod.networkRoute.split(",").map((route, index) => {
|
||||
return (
|
||||
route +
|
||||
(index === parsedData.planDataMod!.networkRoute.split(",").length - 1 ? "" : "|")
|
||||
)
|
||||
})}
|
||||
</p>
|
||||
)}
|
||||
{
|
||||
extraList.map((extra, index) => {
|
||||
return (
|
||||
<p
|
||||
key={index}
|
||||
className={cn(
|
||||
"text-[9px] bg-stone-600 text-stone-200 dark:bg-stone-800 dark:text-stone-300 w-fit rounded-[5px] px-[3px] py-[1.5px]",
|
||||
)}
|
||||
>
|
||||
{extra}
|
||||
</p>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
{extraList.map((extra, index) => {
|
||||
return (
|
||||
<p
|
||||
key={index}
|
||||
className={cn(
|
||||
"text-[9px] bg-stone-600 text-stone-200 dark:bg-stone-800 dark:text-stone-300 w-fit rounded-[5px] px-[3px] py-[1.5px]",
|
||||
)}
|
||||
>
|
||||
{extra}
|
||||
</p>
|
||||
)
|
||||
})}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user