Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## 1️⃣ 작업 내용 Summary - resolved #439 결과물 이미지  ``` **// fileUrl에서 확장자명을 추출한 후 대문자로 변경 const lastDotIndex = file.fileUrl.lastIndexOf('.'); const fileExtension = lastDotIndex !== -1 ? file.fileUrl.substring(lastDotIndex + 1) : '';** return ( <a className={cn( buttonVariants(), 'h-[31px] w-[143px] rounded-[9px] bg-gray-200 text-[16px] font-medium text-gray-600', 'cursor-pointer overflow-hidden text-ellipsis whitespace-nowrap px-2 hover:text-white', className )} title={file.fileType} href={file.fileUrl} download={file.fileName} > **{`${file.fileType} ${fileExtension.toUpperCase()}`}** </a> ); ``` 확장자명 앞에만 .이 있는 게 아니라서 마지막 .을 기준으로 문자열 끝까지를 확장자명으로 추출했습니다. 디자인에는 확장자명을 대문자로 표현해서 toUpperCase()로 대문자화 했습니다. 더 좋은 방법 있으면 말씀해주세요 💀 ## 2️⃣ 추후 작업할 내용 ## 3️⃣ 체크리스트 - [x] `develop` 브랜치의 최신 코드를 `pull` 받았나요?
- Loading branch information