Skip to content

Commit d7329be

Browse files
committed
refactor: code clean up
1 parent 7384edd commit d7329be

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Common/ImageTags.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ export const ImageTagsContainer = ({
401401
Tags cannot be edited/removed later
402402
</div>
403403
)}
404-
<div className="cn-7 mt-12">
404+
<div className="mt-12">
405405
<Textarea
406406
label="Comment"
407407
value={newDescription}

src/Shared/Components/Textarea/Textarea.component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ const Textarea = ({
3232
const textareaRef = useRef<HTMLTextAreaElement>(null)
3333

3434
const updateRefsHeight = (height: number) => {
35-
const refElement = textareaRef?.current
35+
const refElement = textareaRef.current
3636
if (refElement) {
3737
refElement.style.height = `${height}px`
3838
}
3939
}
4040

4141
const reInitHeight = () => {
42-
const currentHeight = parseInt(textareaRef?.current?.style.height, 10)
43-
let nextHeight = textareaRef?.current?.scrollHeight || 0
42+
const currentHeight = parseInt(textareaRef.current.style.height, 10)
43+
let nextHeight = textareaRef.current.scrollHeight || 0
4444

4545
if (nextHeight < currentHeight || currentHeight > AUTO_EXPANSION_MAX_HEIGHT) {
4646
return

0 commit comments

Comments
 (0)