-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Closes #7324 Closes #7323 - This PR solves the issue - - #7324 - #7323 - On Enter the rename of the file is saved - Removed renaming of extension ## After Changes Behaviour https://github.com/user-attachments/assets/f5c47cd4-883e-473e-9cfa-e277f8f630c2 --------- Co-authored-by: Lucas Bordeau <[email protected]>
- Loading branch information
1 parent
7b7c67f
commit 54c328a
Showing
2 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/twenty-front/src/utils/file/getFileNameAndExtension.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export const getFileNameAndExtension = (filenameWithExtension: string) => { | ||
const lastDotIndex = filenameWithExtension.lastIndexOf('.'); | ||
|
||
return { | ||
name: filenameWithExtension.substring(0, lastDotIndex), | ||
extension: filenameWithExtension.substring(lastDotIndex), | ||
}; | ||
}; |