Skip to content

Commit

Permalink
Revert "Fix formula text being janky (#2618)" (#2627)
Browse files Browse the repository at this point in the history
This reverts commit e3482dc.
  • Loading branch information
nguyentvan7 authored Jan 26, 2025
1 parent 27a9181 commit 72d89fb
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions libs/gi/ui/src/util/getCalcDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import { Translate } from '@genshin-optimizer/gi/i18n'
import type { CalcResult } from '@genshin-optimizer/gi/uidata'
import type { Info, InfoExtra, KeyMapPrefix } from '@genshin-optimizer/gi/wr'
import { Typography } from '@mui/material'
import { useContext, type ReactNode } from 'react'
import { SillyContext } from '../context'
import { resolveInfo } from './resolveInfo'
Expand Down Expand Up @@ -220,18 +221,15 @@ function computeFormulaDisplay(

components.filter((c) => c)
result.formula = (
<>
<Typography
sx={{
textDecoration: info.strikethrough ? 'line-through' : undefined,
}}
>
{components.map((x, i) => (
<span
style={{
textDecoration: info.strikethrough ? 'line-through' : undefined,
}}
key={i}
>
{x}
</span>
<span key={i}>{x}</span>
))}
</>
</Typography>
)

return result
Expand Down

0 comments on commit 72d89fb

Please sign in to comment.