mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
Add prettier for codestyle and re-format everything (#1294)
This commit is contained in:
parent
8b78154075
commit
0aae1f70d2
319 changed files with 4809 additions and 3936 deletions
|
@ -12,8 +12,9 @@ export const useTrimmedContent = (content: string): [trimmedContent: string, con
|
|||
const maxLength = useSelector((state: ApplicationState) => state.config.maxDocumentLength)
|
||||
const contentExceedsLimit = content.length > maxLength
|
||||
|
||||
const trimmedContent = useMemo(() => contentExceedsLimit ? content.substr(0, maxLength) : content, [content,
|
||||
contentExceedsLimit,
|
||||
maxLength])
|
||||
const trimmedContent = useMemo(
|
||||
() => (contentExceedsLimit ? content.substr(0, maxLength) : content),
|
||||
[content, contentExceedsLimit, maxLength]
|
||||
)
|
||||
return [trimmedContent, contentExceedsLimit]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue