mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-29 02:18:09 +03:00
fix(client): why the hell are there two setComments
i reckon it's something to do with pbs not having comments but like. why the hell did i make this?
This commit is contained in:
@@ -556,7 +556,12 @@ function PseudHighlight({
|
||||
/>
|
||||
) : (
|
||||
<span className="breakdown-hover-highlight-button">
|
||||
<Icon onClick={() => setHighlight(true)} type="star" regular noPad />
|
||||
<Icon
|
||||
onClick={() => setHighlight(true)}
|
||||
type="star"
|
||||
regular
|
||||
style={{ paddingTop: "0.1rem" }}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
</td>
|
||||
|
||||
@@ -66,7 +66,11 @@ export default function DocumentComponent({
|
||||
chart,
|
||||
}: {
|
||||
score: ScoreDocument | PBScoreDocument;
|
||||
scoreState: { highlight: boolean; setHighlight: SetState<boolean> };
|
||||
scoreState: {
|
||||
highlight: boolean;
|
||||
setHighlight: SetState<boolean>;
|
||||
setComment?: SetState<string | null>;
|
||||
};
|
||||
renderScoreInfo?: boolean;
|
||||
showSingleScoreNote?: boolean;
|
||||
pbData: UGPTChartPBComposition;
|
||||
@@ -88,6 +92,11 @@ export default function DocumentComponent({
|
||||
setComment(IsScore(score) ? score.comment : null);
|
||||
}, [score]);
|
||||
|
||||
useEffect(() => {
|
||||
// what kind of crack was i smoking here?
|
||||
scoreState.setComment?.(comment);
|
||||
}, [comment]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="col-9">
|
||||
|
||||
Reference in New Issue
Block a user