修改bug

This commit is contained in:
ymk
2025-08-02 17:08:33 +08:00
parent 7484154216
commit 48d07b5f8f
2 changed files with 4 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ export default function HomePage() {
<Heading as="h2" size={"8"}>
{t("toolTitle")}
</Heading>
<Editor></Editor>
<Editor textProp={undefined} backgroundProp={undefined}></Editor>
</Flex>
</Section>

View File

@@ -14,20 +14,20 @@ import { useRouter } from "@/i18n/navigation";
* 简易工具
* @returns
*/
export default function Page() {
export default function SimpleEditor({ textProp, backgroundProp }: { textProp: TextProp | undefined, backgroundProp: BackgroundProp | undefined }) {
const t = useTranslations("TextEditor");
const tIndex = useTranslations("HomePage");
const router = useRouter();
let backgroundProp = {
backgroundProp = {
type: "color",
color: "#c4b1b1",
image: null,
} satisfies BackgroundProp;
let textProp = TextProp.default(t("defaultText"));
textProp = textProp || TextProp.default(t("defaultText"));
const [background, setBackground] = useState<BackgroundProp>(backgroundProp);