Skip to content

Commit

Permalink
fixup! Add new settings row component for new style of rows
Browse files Browse the repository at this point in the history
  • Loading branch information
raksooo committed Jan 29, 2024
1 parent abd4647 commit 95b3fdc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions gui/src/renderer/components/cell/SettingsGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
import React, { useCallback, useContext, useEffect, useId, useMemo, useState } from 'react';
import styled from 'styled-components';

import { colors } from '../../../config.json';
Expand Down Expand Up @@ -33,14 +33,9 @@ interface SettingsGroupContext {

const settingsGroupContext = React.createContext<SettingsGroupContext>({});

let keyCounter = 0;
function getErrorKey() {
return ++keyCounter;
}

export function useSettingsGroupContext() {
const { setError, unsetError } = useContext(settingsGroupContext);
const key = useMemo(() => `error-${getErrorKey()}`, []);
const key = useId();

const reportError = useCallback(
(errorMessage: string) => {
Expand Down

0 comments on commit 95b3fdc

Please sign in to comment.