diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 2295603..5ecf4a2 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -17,7 +17,7 @@ "message": "Rule Sets" }, "empty_ruleset": { - "message": "(There are no rule sets available. Click the button below to add it.)" + "message": "There are no rule sets available. Click the button below to add it." }, "Notice": { "message": "Notice" diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index e245edf..a038b7d 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -17,7 +17,7 @@ "message": "ルールセット一覧" }, "empty_ruleset": { - "message": "(ルールセットがありません。下のボタンをクリックして追加してください。)" + "message": "ルールセットがありません。下のボタンをクリックして追加してください。" }, "Notice": { "message": "注意事項" diff --git a/src/features/options/components/ruleset/RuleSetsEdit.tsx b/src/features/options/components/ruleset/RuleSetsEdit.tsx index 971163c..421c756 100644 --- a/src/features/options/components/ruleset/RuleSetsEdit.tsx +++ b/src/features/options/components/ruleset/RuleSetsEdit.tsx @@ -9,6 +9,7 @@ import { Box, Button, Text, + Heading, } from "@chakra-ui/react"; import { css } from "@emotion/react"; import { CSSTransition } from "react-transition-group"; @@ -24,6 +25,7 @@ import { RuleSetMenu } from "./RuleSetMenu"; type Props = { ruleSets: RuleSets; + titleFontAdjuster: number; onChange: (ruleSets: RuleSets) => void; }; @@ -37,6 +39,7 @@ const listTransitionCss = css(` export const RuleSetsEdit: React.FC = ({ ruleSets: originalRuleSets, + titleFontAdjuster, onChange, }) => { const i18n = useI18n(); @@ -86,11 +89,19 @@ export const RuleSetsEdit: React.FC = ({ return ( <> - {ruleSets.length === 0 && ( - - {i18n["empty_ruleset"]} - + {ruleSets.length > 0 ? ( + + {i18n["RuleSets"]}: + + ) : ( + {i18n["empty_ruleset"]} )} + {ruleSets.map((ruleSet, ruleSetIndex) => ( { /> - - {i18n["RuleSets"]}: - - - +