Skip to content

Commit eb523ee

Browse files
committed
fix formatting
1 parent c8df5e1 commit eb523ee

File tree

1 file changed

+37
-47
lines changed
  • frontend/src/components/FundingStructure

1 file changed

+37
-47
lines changed

frontend/src/components/FundingStructure/index.tsx

+37-47
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,7 @@ export const FundingStructure: FC<FundingStructureProps> = ({
505505
if (structureType === 'tiered' && currentStructure.tiers) {
506506
const totalEquity = currentStructure.tiers.reduce(
507507
(sum, tier) =>
508-
sum +
509-
(Number.parseFloat(tier.equityPercentage) || 0),
508+
sum + (Number.parseFloat(tier.equityPercentage) || 0),
510509
0
511510
);
512511

@@ -1176,9 +1175,7 @@ export const FundingStructure: FC<FundingStructureProps> = ({
11761175
className="text-[#ff7f29] hover:text-[#e06b20]"
11771176
>
11781177
<FiX
1179-
size={
1180-
16
1181-
}
1178+
size={16}
11821179
/>
11831180
</button>
11841181
)}
@@ -1198,14 +1195,11 @@ export const FundingStructure: FC<FundingStructureProps> = ({
11981195
value={
11991196
tier.amount
12001197
}
1201-
onChange={(
1202-
e
1203-
) =>
1198+
onChange={(e) =>
12041199
handleUpdateTier(
12051200
tier.id,
12061201
'amount',
1207-
e
1208-
.target
1202+
e.target
12091203
.value
12101204
)
12111205
}
@@ -1223,10 +1217,9 @@ export const FundingStructure: FC<FundingStructureProps> = ({
12231217
validationErrors
12241218
.tiers?.[
12251219
tier.id
1226-
]
1227-
?.amount
1228-
? 'border-red-500'
1229-
: 'border-gray-300'
1220+
]?.amount
1221+
? 'border-red-500'
1222+
: 'border-gray-300'
12301223
}`}
12311224
placeholder="e.g. 1000"
12321225
/>
@@ -1237,8 +1230,7 @@ export const FundingStructure: FC<FundingStructureProps> = ({
12371230
validationErrors
12381231
.tiers?.[
12391232
tier.id
1240-
]
1241-
?.amount && (
1233+
]?.amount && (
12421234
<p
12431235
className={
12441236
errorTextStyle
@@ -1249,7 +1241,8 @@ export const FundingStructure: FC<FundingStructureProps> = ({
12491241
.tiers[
12501242
tier
12511243
.id
1252-
].amount
1244+
]
1245+
.amount
12531246
}
12541247
</p>
12551248
)}
@@ -1272,23 +1265,19 @@ export const FundingStructure: FC<FundingStructureProps> = ({
12721265
htmlFor={`equity-tier-${tier.id}`}
12731266
className="block text-sm font-medium text-gray-700 mb-1"
12741267
>
1275-
Total Equity
1276-
(%)
1268+
Total Equity (%)
12771269
</label>
12781270
<input
12791271
id={`equity-tier-${tier.id}`}
12801272
type="number"
12811273
value={
12821274
tier.equityPercentage
12831275
}
1284-
onChange={(
1285-
e
1286-
) =>
1276+
onChange={(e) =>
12871277
handleUpdateTier(
12881278
tier.id,
12891279
'equityPercentage',
1290-
e
1291-
.target
1280+
e.target
12921281
.value
12931282
)
12941283
}
@@ -1308,8 +1297,8 @@ export const FundingStructure: FC<FundingStructureProps> = ({
13081297
.tiers?.[
13091298
tier
13101299
.id
1311-
]
1312-
?.equityPercentage
1300+
]
1301+
?.equityPercentage
13131302
) ||
13141303
(
13151304
validationErrors.equity &&
@@ -1341,7 +1330,8 @@ export const FundingStructure: FC<FundingStructureProps> = ({
13411330
.tiers[
13421331
tier
13431332
.id
1344-
].equityPercentage
1333+
]
1334+
.equityPercentage
13451335
}
13461336
</p>
13471337
)}
@@ -1370,7 +1360,8 @@ export const FundingStructure: FC<FundingStructureProps> = ({
13701360
}
13711361
>
13721362
{currentStructure.tiers &&
1373-
currentStructure.tiers.length >= 5
1363+
currentStructure.tiers.length >=
1364+
5
13741365
? '+ Add Tier (Max 5)'
13751366
: '+ Add Tier'}
13761367
</Button>
@@ -1982,8 +1973,7 @@ export const FundingStructure: FC<FundingStructureProps> = ({
19821973
handleUpdateTier(
19831974
tier.id,
19841975
'amount',
1985-
e
1986-
.target
1976+
e.target
19871977
.value
19881978
)
19891979
}
@@ -2025,7 +2015,7 @@ export const FundingStructure: FC<FundingStructureProps> = ({
20252015
.tiers[
20262016
tier
20272017
.id
2028-
].amount
2018+
].amount
20292019
}
20302020
</p>
20312021
)}
@@ -2048,11 +2038,10 @@ export const FundingStructure: FC<FundingStructureProps> = ({
20482038
handleUpdateTier(
20492039
tier.id,
20502040
'equityPercentage',
2051-
e
2052-
.target
2041+
e.target
20532042
.value
2054-
)
2055-
}
2043+
)
2044+
}
20562045
onBlur={() =>
20572046
markTierFieldAsTouched(
20582047
tier.id,
@@ -2069,17 +2058,17 @@ export const FundingStructure: FC<FundingStructureProps> = ({
20692058
.tiers?.[
20702059
tier
20712060
.id
2072-
]
2073-
?.equityPercentage
2074-
) ||
2075-
(
2076-
validationErrors.equity &&
2077-
shouldShowError(
2078-
'equity'
2079-
)
2080-
)
2081-
? 'border-red-500'
2082-
: 'border-gray-300'
2061+
]
2062+
?.equityPercentage
2063+
) ||
2064+
(
2065+
validationErrors.equity &&
2066+
shouldShowError(
2067+
'equity'
2068+
)
2069+
)
2070+
? 'border-red-500'
2071+
: 'border-gray-300'
20832072
}`}
20842073
placeholder="e.g. 10"
20852074
/>
@@ -2102,7 +2091,8 @@ export const FundingStructure: FC<FundingStructureProps> = ({
21022091
.tiers[
21032092
tier
21042093
.id
2105-
].equityPercentage
2094+
]
2095+
.equityPercentage
21062096
}
21072097
</p>
21082098
)}

0 commit comments

Comments
 (0)