mirror of
https://github.com/block/bitcoin-treasury.git
synced 2025-09-05 19:29:23 +00:00
fix spacing for larger holdings amounts
This commit is contained in:
parent
464f902776
commit
3b64a6b636
@ -33,13 +33,18 @@ function HomeContent() {
|
||||
const searchParams = useSearchParams();
|
||||
const router = useRouter();
|
||||
// const displayLength = useDisplayLength();
|
||||
const displayLength = 20; // Fallback to a fixed length for simplicity
|
||||
|
||||
const [bitcoinPrice, setBitcoinPrice] = useState(0);
|
||||
const previousPriceRef = useRef(0);
|
||||
const [priceDirection, setPriceDirection] = useState<string | null>(null);
|
||||
const [holding] = useState(8584);
|
||||
const [holdingValue, setHoldingValue] = useState(0);
|
||||
|
||||
// Calculate display length based on holding value
|
||||
const getDisplayLength = (holdingValue: number) => {
|
||||
return holdingValue >= 1000000000 ? 22 : 20; // 22 for 1B+, 20 for under
|
||||
};
|
||||
|
||||
const displayLength = getDisplayLength(holdingValue);
|
||||
const [currentRowIndex, setCurrentRowIndex] = useState(-1);
|
||||
const [ticker, setTicker] = useState(searchParams.get("ticker") || "XYZ");
|
||||
const [inputError, setInputError] = useState<string | null>(null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user