Skip to content

Commit

Permalink
Merge branch 'main' into 14290-type-issue-in-backend-when-editing-a-c…
Browse files Browse the repository at this point in the history
…ode-list-with-numbers
  • Loading branch information
ErlingHauan authored Jan 2, 2025
2 parents 795ae2c + 1aa8bb1 commit ed4a257
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StudioCodeListEditor, StudioToggleableTextfield } from '@studio/compone
import React from 'react';
import { useTranslation } from 'react-i18next';
import type { CodeListWithMetadata } from '../../CodeListPage';
import { useOptionListEditorTexts } from '../../hooks/useCodeListEditorTexts';
import { useCodeListEditorTexts } from '../../hooks/useCodeListEditorTexts';
import { KeyVerticalIcon } from '@studio/icons';
import { updateCodeListWithMetadata } from '../CodeLists';
import { ArrayUtils, FileNameUtils } from '@studio/pure-functions';
Expand All @@ -24,7 +24,7 @@ export function EditCodeList({
codeListNames,
}: EditCodeListProps): React.ReactElement {
const { t } = useTranslation();
const editorTexts: CodeListEditorTexts = useOptionListEditorTexts();
const editorTexts: CodeListEditorTexts = useCodeListEditorTexts();
const getInvalidInputFileNameErrorMessage = useInputCodeListNameErrorMessage();

const handleUpdateCodeListId = (newCodeListId: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@studio/components';
import type { CodeList, CodeListEditorTexts } from '@studio/components';
import { useTranslation } from 'react-i18next';
import { useOptionListEditorTexts } from '../../hooks/useCodeListEditorTexts';
import { useCodeListEditorTexts } from '../../hooks/useCodeListEditorTexts';
import { CheckmarkIcon } from '@studio/icons';
import classes from './CreateNewCodeListModal.module.css';
import type { CodeListWithMetadata } from '../../CodeListPage';
Expand Down Expand Up @@ -68,7 +68,7 @@ function CreateNewCodeList({
onCloseModal,
}: CreateNewCodeListProps) {
const { t } = useTranslation();
const editorTexts: CodeListEditorTexts = useOptionListEditorTexts();
const editorTexts: CodeListEditorTexts = useCodeListEditorTexts();
const getInvalidInputFileNameErrorMessage = useInputCodeListNameErrorMessage();
const [isCodeListValid, setIsCodeListValid] = useState<boolean>(true);
const [codeListTitleError, setCodeListTitleError] = useState<string>('');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useTranslation } from 'react-i18next';
import type { CodeListEditorTexts } from '@studio/components';

export const useOptionListEditorTexts = (): CodeListEditorTexts => {
export const useCodeListEditorTexts = (): CodeListEditorTexts => {
const { t } = useTranslation();

return {
Expand Down

0 comments on commit ed4a257

Please sign in to comment.