mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-11 21:30:59 +00:00
feat: update eslint & prettier rules
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user