Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/features/dashboard_Id/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Card({
draggable="true"
onDragStart={() => setDraggingCard({ cardData: card })}
onContextMenu={(e: React.MouseEvent) => e.preventDefault()}
className="BG-white Border-section relative rounded-6 border-solid px-20 py-16"
className="BG-white Border-section relative rounded-6 border-solid px-20 py-16 transition-transform duration-300 ease-in-out hover:scale-95"
onClick={() => setOpenCard(true)}
>
<div className="mobile:flex-col tablet:flex tablet:w-full tablet:items-center tablet:gap-20">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { Assignee } from '../../type/Card.type'
import type { CardFormData } from '../../type/CardFormData.type'
import MyAssignee from '../MyAssignee'
import TagsCanDelete from '../TagsCanDelete'
// import AssigneeList, { Assignee } from './AssigneeList'
import AssigneeList from './AssigneeList'
import DateInput from './input/DateInput'
import Input from './input/Input'
Expand Down Expand Up @@ -170,6 +169,7 @@ export default function CreateCardForm({
className="Input h-126 resize-none"
id="description"
placeholder="์„ค๋ช…์„ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”"
maxLength={250}
/>
</Input>

Expand Down Expand Up @@ -209,6 +209,7 @@ export default function CreateCardForm({
onKeyDown={(e) => {
if (e.key === 'Enter') {
e.preventDefault()
if (e.nativeEvent.isComposing) return //ํ˜„์žฌ ๋‹จ์–ด๊ฐ€ composition ์ค‘์ธ์ง€ ์ฒดํฌํ•˜์—ฌ, ์ด๋ฒคํŠธ ์ค‘๋ณต ๋ฐœ์ƒ์„ ๋ฐฉ์ง€.(ํ•œ๊ธ€ ์ž…๋ ฅ ์‹œ ๋งˆ์ง€๋ง‰ ๊ธ€์ž ๋‚จ๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐ)
if (tagInput.trim() === '') return
if (!tags.includes(tagInput.trimEnd())) {
setTags((prev) => [...prev, tagInput.trim()]) // ์ค‘๋ณต ํƒœ๊ทธ๊ฐ€ ์•„๋‹ˆ๋ฉด ok, ํƒœ๊ทธ๋ฐฐ์—ด์— ์ถ”๊ฐ€ ๋ฐ ์ž…๋ ฅ์ฐฝ ์ดˆ๊ธฐํ™”
Expand All @@ -217,7 +218,13 @@ export default function CreateCardForm({
}
}}
value={tagInput}
onChange={(e) => setTagInput(e.target.value)}
onChange={(e) => {
const value = e.target.value
const allowed = /^[ใ„ฑ-ใ…Žใ…-ใ…ฃ๊ฐ€-ํžฃa-zA-Z\s]*$/
if (allowed.test(value)) {
setTagInput(value)
}
}}
/>

{/* ์ถ”๊ฐ€ํ•œ ํƒœ๊ทธ */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export default function ModifyCardForm({
{...register('description', {
required: '์„ค๋ช…์„ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”',
})}
maxLength={250}
className="Input h-126 resize-none"
id="description"
placeholder="์„ค๋ช…์„ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”"
Expand Down Expand Up @@ -279,6 +280,7 @@ export default function ModifyCardForm({
onKeyDown={(e) => {
if (e.key === 'Enter') {
e.preventDefault()
if (e.nativeEvent.isComposing) return
if (tagInput.trim() === '') return
if (!tags.includes(tagInput.trimEnd())) {
setTags((prev) => [...prev, tagInput.trim()]) // ์ค‘๋ณต ํƒœ๊ทธ๊ฐ€ ์•„๋‹ˆ๋ฉด ok, ํƒœ๊ทธ๋ฐฐ์—ด์— ์ถ”๊ฐ€ ๋ฐ ์ž…๋ ฅ์ฐฝ ์ดˆ๊ธฐํ™”
Expand All @@ -287,7 +289,13 @@ export default function ModifyCardForm({
}
}}
value={tagInput}
onChange={(e) => setTagInput(e.target.value)}
onChange={(e) => {
const value = e.target.value
const allowed = /^[ใ„ฑ-ใ…Žใ…-ใ…ฃ๊ฐ€-ํžฃa-zA-Z\s]*$/
if (allowed.test(value)) {
setTagInput(value)
}
}}
/>

{/* ์ถ”๊ฐ€ํ•œ ํƒœ๊ทธ */}
Expand Down
4 changes: 2 additions & 2 deletions src/app/features/dashboard_Id/Card/cardModal/CardContent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from 'next/image'
import { useTheme } from 'next-themes'
import { useRef, useState } from 'react'
import { useRef } from 'react'

import { Avatar } from '@/app/shared/components/common/Avatar'
import Dropdown from '@/app/shared/components/common/Dropdown/Dropdown'
Expand Down Expand Up @@ -128,7 +128,7 @@ export default function CardContent({
{card.description && (
<p
className={
'font-regular Text-black mb-16 text-14 mobile:mb-32 mobile:text-12'
'font-regular Text-black mb-16 whitespace-pre-line text-14 mobile:mb-32 mobile:text-12'
}
>
{card.description}
Expand Down
5 changes: 4 additions & 1 deletion src/app/features/dashboard_Id/hooks/useInfiniteScroll.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useCallback, useEffect } from 'react'

import { useIsMobile } from '@/app/shared/hooks/useIsmobile'

/**
* ๋ฒ”์šฉ ๋ฌดํ•œ์Šคํฌ๋กค ํ›…
*
Expand All @@ -22,7 +24,8 @@ export const useInfiniteScroll = (
const clientHeight = targetRef?.current?.clientHeight ?? window.innerHeight

const scrollPercentage = (scrollTop + clientHeight) / scrollHeight
const isNearBottom = scrollPercentage >= 0.8

const isNearBottom = scrollPercentage >= 0.7

if (isNearBottom && hasNextPage && !isFetchingNextPage) {
fetchNextPage()
Expand Down
Loading