mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 10:15:17 -04:00
fix: format code
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
d75d406e67
commit
34bf8f16b1
14 changed files with 46 additions and 22 deletions
|
@ -15,6 +15,7 @@ import { useEffect } from 'react'
|
|||
export const useBindYTextToRedux = (realtimeDoc: RealtimeDoc): void => {
|
||||
useEffect(() => {
|
||||
const yText = realtimeDoc.getMarkdownContentChannel()
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
const yTextCallback = () => setNoteContent(yText.toString())
|
||||
yText.observe(yTextCallback)
|
||||
return () => yText.unobserve(yTextCallback)
|
||||
|
|
|
@ -16,7 +16,7 @@ export const extractEmojiShortCode = (emoji: EmojiClickEventDetail): string | un
|
|||
return undefined
|
||||
}
|
||||
let skinToneModifier = ''
|
||||
if ((emoji.emoji as NativeEmoji).skins && emoji.skinTone !== 0) {
|
||||
if ((emoji.emoji as NativeEmoji).skins && (emoji.skinTone as number) !== 0) {
|
||||
skinToneModifier = `:skin-tone-${emoji.skinTone as number}:`
|
||||
}
|
||||
return `:${emoji.emoji.shortcodes[0]}:${skinToneModifier}`
|
||||
|
|
|
@ -22,8 +22,8 @@ export const PermissionSectionSpecialGroups: React.FC<PermissionDisabledProps> =
|
|||
const isOwner = useIsOwner()
|
||||
|
||||
const specialGroupEntries = useMemo(() => {
|
||||
const groupEveryone = groupPermissions.find((entry) => entry.groupName === SpecialGroup.EVERYONE)
|
||||
const groupLoggedIn = groupPermissions.find((entry) => entry.groupName === SpecialGroup.LOGGED_IN)
|
||||
const groupEveryone = groupPermissions.find((entry) => entry.groupName === (SpecialGroup.EVERYONE as string))
|
||||
const groupLoggedIn = groupPermissions.find((entry) => entry.groupName === (SpecialGroup.LOGGED_IN as string))
|
||||
|
||||
return {
|
||||
everyone: groupEveryone
|
||||
|
|
|
@ -55,7 +55,7 @@ export const SplitDivider: React.FC<SplitDividerProps> = ({
|
|||
const className = useMemo(() => {
|
||||
return concatCssClasses(styles.middle, {
|
||||
[styles.open]: forceOpen,
|
||||
[styles[dividerButtonsShift]]: dividerButtonsShift !== ''
|
||||
[styles[dividerButtonsShift]]: dividerButtonsShift !== DividerButtonsShift.NO_SHIFT
|
||||
})
|
||||
}, [dividerButtonsShift, forceOpen])
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export interface OnOffButtonGroupProps {
|
|||
export const OnOffButtonGroup: React.FC<OnOffButtonGroupProps> = ({ onSelect, value }) => {
|
||||
const buttonGroupValue = useMemo(() => (value ? OnOffState.ON : OnOffState.OFF), [value])
|
||||
const onButtonSelect = useCallback(
|
||||
(value: number) => {
|
||||
(value: OnOffState) => {
|
||||
onSelect(value === OnOffState.ON)
|
||||
},
|
||||
[onSelect]
|
||||
|
|
|
@ -32,7 +32,7 @@ export const ProfilePage: React.FC = () => {
|
|||
<Row className='h-100 flex justify-content-center'>
|
||||
<Col lg={6}>
|
||||
<ProfileDisplayName />
|
||||
<ShowIf condition={userProvider === AuthProviderType.LOCAL}>
|
||||
<ShowIf condition={userProvider === (AuthProviderType.LOCAL as string)}>
|
||||
<ProfileChangePassword />
|
||||
</ShowIf>
|
||||
<ProfileAccessTokens />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue