feat: update eslint & prettier rules

This commit is contained in:
HYana
2025-04-30 17:36:46 +08:00
parent d4af2d4326
commit 460e065eed
53 changed files with 2241 additions and 2102 deletions
+34 -30
View File
@@ -1,37 +1,41 @@
"use client"
'use client';
import { Radio } from 'antd';
import { useState } from "react";
import PluginInstalledComponent from "@/app/home/plugins/plugin-installed/PluginInstalledComponent";
import PluginMarketComponent from "@/app/home/plugins/plugin-market/PluginMarketComponent";
import styles from './plugins.module.css'
import { useState } from 'react';
import PluginInstalledComponent from '@/app/home/plugins/plugin-installed/PluginInstalledComponent';
import PluginMarketComponent from '@/app/home/plugins/plugin-market/PluginMarketComponent';
import styles from './plugins.module.css';
export default function PluginConfigPage() {
enum PageType {
INSTALLED = "installed",
MARKET = 'market'
}
enum PageType {
INSTALLED = 'installed',
MARKET = 'market',
}
const [nowPageType, setNowPageType] = useState(PageType.INSTALLED)
const [nowPageType, setNowPageType] = useState(PageType.INSTALLED);
return (
<div className={styles.pageContainer}>
<Radio.Group
block
options={[
{ label: '已安装', value: PageType.INSTALLED },
{ label: '插件市场', value: PageType.MARKET },
]}
defaultValue={PageType.INSTALLED}
value={nowPageType}
optionType="button"
buttonStyle="solid"
style={{ marginBottom: '20px' }}
onChange={(e) => {
setNowPageType(e.target.value as PageType)
}}
/>
return (
<div className={styles.pageContainer}>
<Radio.Group
block
options={[
{ label: '已安装', value: PageType.INSTALLED },
{ label: '插件市场', value: PageType.MARKET },
]}
defaultValue={PageType.INSTALLED}
value={nowPageType}
optionType="button"
buttonStyle="solid"
style={{ marginBottom: '20px' }}
onChange={(e) => {
setNowPageType(e.target.value as PageType);
}}
/>
{nowPageType === PageType.INSTALLED ? <PluginInstalledComponent /> : <PluginMarketComponent />}
</div>
);
{nowPageType === PageType.INSTALLED ? (
<PluginInstalledComponent />
) : (
<PluginMarketComponent />
)}
</div>
);
}