This can be archived simply by passing an onClick event to gutter and coe and manipulating the selectedChanges prop: import {useState, useCallback, useMemo} from 'react'; function File({hunks, diffType}) { const
{ View } from 'react-native' +import { memo, useCallback, useState } from 'react' +import { View, StyleSheet } from 'react-native' import Progress from '@/components/player/Progress' import Status from './Status' @@ -23,38 +23,39 @@ const PlayTimeMax = memo(({ timeStr }: {...
{useMemo} from "react"; + +export const useFormatting = (text: string[], params: { + removeMarkdown?: boolean, + saveBreaklines?: boolean, + specialFunc?: (text: string) => string, +}) => { + return useMemo(() => { + return text.map((value) => { + let newText = ...
this is required whengutterTypeis set to"anchor". Provided function receives achangeobject as the only argument and should return either a string orundefined, ifundefinedis returned noidattribute will be placed on DOM. Theidattribute will be placed on the gutterelement, for normal changes in sp...
{ const theme = useTheme() const [autoUpdate, setAutoUpdate] = useState(true) const { maxPlayTimeStr, nowPlayTimeStr, progress, maxPlayTime } = useProgress(autoUpdate) - usePageVisible([COMPONENT_IDS.home], setAutoUpdate) + usePageVisible([COMPONENT_IDS.home], useCallback((visible) ...