Skip to content

Commit

Permalink
Merge pull request #378 from HoomanDgtl/pricing
Browse files Browse the repository at this point in the history
fix: pricing pages
  • Loading branch information
HoomanDgtl authored Sep 26, 2024
2 parents 9634c5a + 8c7fb5a commit 0c7ac64
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
24 changes: 17 additions & 7 deletions src/components/pricing-page/gpus/gpu-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,24 @@ const Table = ({
);
};

const modelTexts: Record<string, string> = {
rtx: "RTX ",
gtx: "GTX ",
ti: " Ti",
ada: " ADA",
};

const formatText = (model: string) => {
let formattedText = model;
for (const key in modelTexts) {
const regex = new RegExp(key, "gi");
formattedText = formattedText.replace(regex, modelTexts[key]);
}

return formattedText;
};
export const modifyModel = (model: string) => {
return model === "rtxa6000"
? "A6000"
: model?.includes("rtx")
? model?.replace("rtx", "RTX ").replace("ti", " Ti")
: model?.includes("gtx")
? model?.replace("gtx", "GTX ").replace("ti", " Ti")
: model;
return model === "rtxa6000" ? "A6000" : formatText(model);
};

export const price = (price: number) => {
Expand Down
5 changes: 0 additions & 5 deletions src/components/pricing-page/pricing-header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ const pathname = Astro.url.pathname;
<section
class="container mx-auto flex max-w-[1380px] flex-col gap-12 pt-12 md:gap-[4.5rem] md:pt-[100px]"
>
<h1
class="text-center text-[28px] font-semibold leading-none md:text-2lg md:font-bold lg:text-3lg lg:leading-10"
>
Explore Pricing and Earnings on Akash
</h1>
<div class="sidebar-scroll flex flex-col">
<div class="flex w-full justify-center md:hidden">
<Dropdown
Expand Down

0 comments on commit 0c7ac64

Please sign in to comment.