From 532fc0c0063e6600c33ba4900d542e3da02d0419 Mon Sep 17 00:00:00 2001 From: falsycat Date: Sat, 12 Jul 2025 19:34:57 +0900 Subject: [PATCH] add TableDisplay node --- src/locales/jp.json | 4 ++++ src/pages/Screening.tsx | 3 ++- src/pages/node/fetch.tsx | 2 +- src/pages/node/index.tsx | 1 + src/pages/node/present.tsx | 15 +++++++++++++++ 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/pages/node/present.tsx diff --git a/src/locales/jp.json b/src/locales/jp.json index 7aeca68..30ec264 100644 --- a/src/locales/jp.json +++ b/src/locales/jp.json @@ -13,6 +13,10 @@ "nodes": { "fetch_ToshoListed": { "title": "東証上場銘柄一覧" + }, + "present_TableDisplay": { + "title": "銘柄一覧表示", + "open": "開く" } } } diff --git a/src/pages/Screening.tsx b/src/pages/Screening.tsx index eb76a79..9155c2c 100644 --- a/src/pages/Screening.tsx +++ b/src/pages/Screening.tsx @@ -8,10 +8,11 @@ import { History, Impl as HistoryImpl } from "./context/History"; const nodeTypes = { fetch_ToshoListed: node.fetch.ToshoListed, + present_TableDisplay: node.present.TableDisplay, }; const initialNodes: Node[] = [ {id: "n1", type: "fetch_ToshoListed", position: {x:0, y:0}, data: {prime: true, standard: true, growth: true}}, - {id: "n2", position: {x:0, y:100}, data: {label: "hi"}}, + {id: "n2", type: "present_TableDisplay", position: {x:0, y:100}, data: {}}, {id: "n3", position: {x:0, y:200}, data: {label: "hello"}}, ]; diff --git a/src/pages/node/fetch.tsx b/src/pages/node/fetch.tsx index 7ff90cf..a501768 100644 --- a/src/pages/node/fetch.tsx +++ b/src/pages/node/fetch.tsx @@ -9,7 +9,7 @@ export type ToshoListed = Node<{ prime: boolean, standard: boolean, growth: boolean, -}, "ToshoListed">; +}, "fetch_ToshoListed">; export function ToshoListed({id, data}: NodeProps) { const {t} = useTranslation(); diff --git a/src/pages/node/index.tsx b/src/pages/node/index.tsx index 963c1f1..1885fa1 100644 --- a/src/pages/node/index.tsx +++ b/src/pages/node/index.tsx @@ -1,2 +1,3 @@ export { default as Base } from "./Base"; export * as fetch from "./fetch"; +export * as present from "./present"; diff --git a/src/pages/node/present.tsx b/src/pages/node/present.tsx new file mode 100644 index 0000000..a16ed03 --- /dev/null +++ b/src/pages/node/present.tsx @@ -0,0 +1,15 @@ +import { useTranslation } from "react-i18next"; +import { Handle, Position } from "@xyflow/react"; +import Base from "./Base"; + +export function TableDisplay() { + const {t} = useTranslation(); + return ( + +
+
{t("pages.screening.nodes.present_TableDisplay.open")}
+
+ + + ); +}