let fs = require("fs")
let fileName = "test.tsx";
let path = "pages/test"
let storeName = "TestStore"
let className = "Test"

let str =`
import { Tooltip } from "antd";
import { inject, observer } from "mobx-react";
import type { ColumnsType } from 'antd/es/table';
import BTable from "@/components/useTable";
import { UserDataType } from "@/store/user";

const ${className} = (props) => {
    const { ${storeName} } = props;
    return (
        <div className="contentBox">
            <BTable store={${storeName}} />
        </div>
    );
};

export default inject("${storeName}")(observer(${className}));
`

fs.mkdirSync(path);
fs.writeFile(path + "/" + fileName, str, function (err) {
    console.log(err);
})

fs.writeFile(path + "/" + fileName, str, function (err) {
    console.log(err);
})