Skip to content
Merged
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
42 changes: 34 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format": "biome format --write ."
},
"dependencies": {
"@filecoin-foundation/ui-filecoin": "^0.7.5",
"@filecoin-foundation/ui-filecoin": "^0.8.0",
"@filoz/synapse-sdk": "^0.37.0",
"@headlessui/react": "^2.2.9",
"@phosphor-icons/react": "^2.1.10",
Expand Down
1 change: 1 addition & 0 deletions src/app/agents/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default async function Agents() {
}}
badge={{
text: `RFS-${id}`,
textTransform: 'none',
variant: 'primary',
}}
/>
Expand Down
9 changes: 6 additions & 3 deletions src/components/ServiceOffered.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ type ServiceOfferedProps = {

export function ServiceOffered({ isActive, isApproved }: ServiceOfferedProps) {
const serviceTier = getServiceTier(isActive, isApproved)
const labelTextTransform = 'none'

if (serviceTier === ServiceTier.INACTIVE) {
return (
<div className="py-4 flex flex-col items-start">
<Badge variant="tertiary">
<Badge textTransform={labelTextTransform} variant="tertiary">
{SERVICE_TIER_LABELS[ServiceTier.INACTIVE]}
</Badge>
</div>
Expand All @@ -27,11 +28,13 @@ export function ServiceOffered({ isActive, isApproved }: ServiceOfferedProps) {
return (
<div className="py-4 flex flex-col gap-2 items-start">
{serviceTier === ServiceTier.WARM_AND_PDP && (
<Badge variant="secondary">
<Badge textTransform={labelTextTransform} variant="secondary">
{SERVICE_TIER_LABELS[ServiceTier.WARM_AND_PDP]}
</Badge>
)}
<Badge>{SERVICE_TIER_LABELS[ServiceTier.PDP_ONLY]}</Badge>
<Badge textTransform={labelTextTransform}>
{SERVICE_TIER_LABELS[ServiceTier.PDP_ONLY]}
</Badge>
</div>
)
}
4 changes: 2 additions & 2 deletions src/utils/service-tier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export enum ServiceTier {
* Human-readable labels for service tiers
*/
export const SERVICE_TIER_LABELS: Record<ServiceTier, string> = {
[ServiceTier.WARM_AND_PDP]: 'Warm Storage',
[ServiceTier.PDP_ONLY]: 'PDP Storage',
[ServiceTier.WARM_AND_PDP]: 'Warm storage',
[ServiceTier.PDP_ONLY]: 'PDP storage',
Comment on lines +15 to +16
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Figma designs it's Warm Storage and PDP Storage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching this! I think we decided to use only first-letter capitalization for our labels - so it would be an inconsistency in the design. πŸ™πŸΌ

[ServiceTier.INACTIVE]: 'Inactive',
}

Expand Down
Loading