mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 01:36:24 +01:00
refactor(react/settings): add names to all form groups
This commit is contained in:
@@ -190,6 +190,6 @@ export function useTriliumOptions<T extends OptionNames>(...names: T[]) {
|
||||
* @param prefix a prefix to add to the unique name.
|
||||
* @returns a name with the given prefix and a random alpanumeric string appended to it.
|
||||
*/
|
||||
export function useUniqueName(prefix: string) {
|
||||
return useMemo(() => prefix + "-" + utils.randomString(10), [ prefix]);
|
||||
export function useUniqueName(prefix?: string) {
|
||||
return useMemo(() => (prefix ? prefix + "-" : "") + utils.randomString(10), [ prefix ]);
|
||||
}
|
||||
Reference in New Issue
Block a user