Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
wadabee committed Nov 15, 2024
1 parent 4dd8645 commit 25be7fe
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions packages/web/src/pages/useCaseBuilder/UseCaseBuilderEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ import {
getItemsFromPlaceholders,
} from '../../utils/UseCaseBuilderUtils';

// // 途中でプレースホルダーの項目名(exampleの項目名)が書き換わることがあるため、配列でexamplesを管理
// // DBに登録するタイミングでObjectに変換する
// type TemporayInputExample = {
// title: string;
// examples: string[];
// };

type StateType = {
useCaseId: string | null;
setUseCaseId: (s: string | null) => void;
Expand Down Expand Up @@ -108,36 +101,6 @@ const useUseCaseBuilderEditPageState = create<StateType>((set, get) => {
};
});

// const flattenInputExamples = (
// itemLables: string[],
// tmp: UseCaseInputExample[]
// ): TemporayInputExample[] => {
// return tmp.map((t) => {
// return {
// title: t.title,
// examples: itemLables.map((label) => t.examples[label]),
// };
// });
// };

// // "入力例"の変数をDB格納用の形式に変換する
// const convertInputExamples = (
// itemLables: string[],
// tmp: TemporayInputExample[]
// ): UseCaseInputExample[] => {
// return tmp.map((t) => {
// const examples: Record<string, string> = {};
// itemLables.forEach((label, idx) => {
// examples[label] = t.examples[idx];
// });

// return {
// title: t.title,
// examples,
// };
// });
// };

const UseCaseBuilderEditPage: React.FC = () => {
const navigate = useNavigate();
const { useCaseId: useCaseIdPathParam } = useParams();
Expand Down Expand Up @@ -204,14 +167,6 @@ const UseCaseBuilderEditPage: React.FC = () => {
return getItemsFromPlaceholders(placeholders);
}, [placeholders]);

// // 登録用のフォーマットに変換
// const convertedInputExamples = useMemo(() => {
// return convertInputExamples(
// items.map((item) => item.label),
// inputExamples
// );
// }, [inputExamples, items]);

const isUpdate = useMemo(() => {
return !!useCaseId;
}, [useCaseId]);
Expand Down

0 comments on commit 25be7fe

Please sign in to comment.