Skip to content

Commit b2d8e93

Browse files
committed
fix linter
1 parent 7faf78a commit b2d8e93

File tree

1 file changed

+10
-10
lines changed
  • src/components/StoragePricingCalculator

1 file changed

+10
-10
lines changed

src/components/StoragePricingCalculator/index.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React, { useState, useMemo } from 'react';
1+
import React, { useMemo, useState } from 'react';
22
import { useColorMode } from '@docusaurus/theme-common';
3-
import clsx from 'clsx';
43
import Admonition from '@theme/Admonition';
4+
import clsx from 'clsx';
55
import styles from './StoragePricingCalculator.module.css';
66

77
const pricingTiers = [
@@ -49,10 +49,10 @@ const StoragePricingCalculator = () => {
4949
const [lists, setLists] = useState(1000);
5050

5151
const calculations = useMemo(() => {
52-
const storageCost = (storageGB * storageHours / 1000) * selectedStorageType.baseStoragePrice * selectedTier.storageMultiplier;
52+
const storageCost = ((storageGB * storageHours) / 1000) * selectedStorageType.baseStoragePrice * selectedTier.storageMultiplier;
5353
const readCost = (reads / 1000) * selectedStorageType.baseReadPrice * selectedTier.readMultiplier;
5454
const writeCost = (writes / 1000) * selectedStorageType.baseWritePrice * selectedTier.writeMultiplier;
55-
const listCost = selectedStorageType.hasLists && selectedStorageType.baseListPrice
55+
const listCost = selectedStorageType.hasLists && selectedStorageType.baseListPrice
5656
? (lists / 1000) * selectedStorageType.baseListPrice * (selectedTier.listMultiplier || 1)
5757
: 0;
5858

@@ -75,7 +75,7 @@ const StoragePricingCalculator = () => {
7575
</div>
7676

7777
<Admonition type="warning" title="This is an estimate">
78-
This is an estimate based on current pricing. Actual costs may vary.<br/>
78+
This is an estimate based on current pricing. Actual costs may vary.<br/>
7979
Prices are per 1,000 GB-hours for storage and per 1,000 operations for reads/writes/lists.
8080
</Admonition>
8181

@@ -117,7 +117,7 @@ const StoragePricingCalculator = () => {
117117
<div className={styles.radioContent}>
118118
<strong>{tier.name}</strong>
119119
<span>
120-
{tier.storageMultiplier < 1
120+
{tier.storageMultiplier < 1
121121
? `${((1 - tier.storageMultiplier) * 100).toFixed(0)}% discount`
122122
: 'Standard pricing'
123123
}
@@ -150,7 +150,7 @@ const StoragePricingCalculator = () => {
150150
type="number"
151151
min="0"
152152
value={reads}
153-
onChange={(e) => setReads(parseInt(e.target.value) || 0)}
153+
onChange={(e) => setReads(parseInt(e.target.value, 10) || 0)}
154154
/>
155155
</div>
156156
<div className={styles.inputGroup}>
@@ -160,7 +160,7 @@ const StoragePricingCalculator = () => {
160160
type="number"
161161
min="1"
162162
value={storageHours}
163-
onChange={(e) => setStorageHours(parseInt(e.target.value) || 0)}
163+
onChange={(e) => setStorageHours(parseInt(e.target.value, 10) || 0)}
164164
/>
165165
</div>
166166
<div className={styles.inputGroup}>
@@ -170,7 +170,7 @@ const StoragePricingCalculator = () => {
170170
type="number"
171171
min="0"
172172
value={writes}
173-
onChange={(e) => setWrites(parseInt(e.target.value) || 0)}
173+
onChange={(e) => setWrites(parseInt(e.target.value, 10) || 0)}
174174
/>
175175
</div>
176176
{selectedStorageType.hasLists && (
@@ -181,7 +181,7 @@ const StoragePricingCalculator = () => {
181181
type="number"
182182
min="0"
183183
value={lists}
184-
onChange={(e) => setLists(parseInt(e.target.value) || 0)}
184+
onChange={(e) => setLists(parseInt(e.target.value, 10) || 0)}
185185
/>
186186
</div>
187187
)}

0 commit comments

Comments
 (0)