huiqi 3 mesiacov pred
rodič
commit
dd80c1bb63
3 zmenil súbory, kde vykonal 320 pridanie a 177 odobranie
  1. 13 0
      src/apis/index.ts
  2. 249 163
      src/pages/takai/questionAnswer/info/index.tsx
  3. 58 14
      src/router.tsx

+ 13 - 0
src/apis/index.ts

@@ -8,6 +8,12 @@ export type LoginApiParams = {
     password: string,
 };
 
+// Api参数类型
+export type JkLoginApiParams = {
+    code: string,
+    redirectUrl: string,
+};
+
 export type FetchAppListApiParams = {
     pageNumber: number,
     pageSize: number,
@@ -117,6 +123,7 @@ export type FetchAuditConfigLibListApiParams = {
 };
 
 // Api函数类型
+export type JkLoginApi = (data: JkLoginApiParams) => Promise<any>;
 export type LoginApi = (data: LoginApiParams) => Promise<any>;
 export type LogoutApi = () => Promise<any>;
 export type FetchAppListApi = (data: FetchAppListApiParams) => Promise<any>;
@@ -175,6 +182,11 @@ export type ModifyTakaiAuditDocumentLibApi = (id: string, data: ModifyDocumentAp
 export type AuditTakaiApplicationApi = (appId: string, userId: string) => Promise<any>;
 export type FetchTakaiProjectApi = () => Promise<any>;
 
+// 建科登录
+const jkloginApi: JkLoginApi = async (data) => {
+    return api.post('/jk_code_login', data);
+};
+
 // 登录
 const loginApi: LoginApi = async (data) => {
     return api.post('/login', data);
@@ -457,6 +469,7 @@ const fetchTakaiProjectApi: FetchTakaiProjectApi = async () => {
 };
 
 export const apis = {
+    jklogin: jkloginApi,
     login: loginApi,
     logout: logoutApi,
     fetchAppList: fetchAppListApi,

+ 249 - 163
src/pages/takai/questionAnswer/info/index.tsx

@@ -117,6 +117,7 @@ const QuestionAnswerInfo: React.FC = () => {
     const [isVisibleCus, setIsVisibleCus] = React.useState(false);
     const [isVisibleSlice, setIsVisibleSlice] = React.useState(false);
     const [isVisibleRerank, setIsVisibleRerank] = React.useState(false);
+    const [isDeepThinkVisible, setIsDeepThinkVisible] = React.useState(false);
     const [name, setName] = React.useState('');
     const [appTypeList, setAppTypeList] = React.useState<AppTypeList>([]);
     const [updateFlag, setUpdateFlag] = React.useState<boolean>();
@@ -267,6 +268,12 @@ const QuestionAnswerInfo: React.FC = () => {
                 }else{
                     setIsAppPro(false);
                 }
+
+                if(info.model === 'Qwen3-30B') {
+                    setIsDeepThinkVisible(true);
+                } else {
+                    setIsDeepThinkVisible(false);
+                }
                 form.setFieldsValue({
                     id: info.id,
                     name: info.name,  //应用名称
@@ -276,6 +283,7 @@ const QuestionAnswerInfo: React.FC = () => {
                     temperature: info.temperature as number, //温度
                     knowledge_ids: info.knowledgeIds,
                     model: info.model,
+                    isDeepThink: info.isDeepThink,
                     icon_color: info.icon_color,
                     icon_type: info.icon_type,
                     questionList: sd, //问题列表
@@ -283,7 +291,7 @@ const QuestionAnswerInfo: React.FC = () => {
                     updateDate: info.updateDate, // 更新时间
                     appProId: info.typeId, //项目级应用类型
                     typeId: info.typeId === 42 || info.typeId === 43 ? 41 : info.typeId, //应用类型
-                    
+
                     param_desc: data_info.param_desc, //回答风格
                     show_recall_result: data_info.show_recall_result, //是否展示召回结果
                     recall_method: data_info.recall_method, //召回方式
@@ -389,6 +397,14 @@ const QuestionAnswerInfo: React.FC = () => {
         }
     }
 
+    // const [modelValue, setModelValue] = useState('');
+    //
+    // // 监听表单中模型值的变化
+    // useEffect(() => {
+    //     const currentModel = form.getFieldValue('model');
+    //     setModelValue(currentModel);
+    // }, [form]); // 依赖表单实例,当表单值变化时重新执行
+
     return (
         <div className='questionAnswerInfo'>
             <Spin spinning={pageLoading}>
@@ -427,7 +443,7 @@ const QuestionAnswerInfo: React.FC = () => {
                                 }
                             </Select>
                         </FormItem>
-                                
+
                         {
                             isAppPro &&
                             <FormItem
@@ -564,6 +580,7 @@ const QuestionAnswerInfo: React.FC = () => {
                                                     knowledge_ids: values.knowledge_ids,
                                                     slice_count: values.slice_count,
                                                     model: values.model,
+                                                    isDeepThink:values.isDeepThink,
                                                     icon_color: values.icon_color,
                                                     icon_type: values.icon_type,
                                                     questionList: question,
@@ -681,198 +698,267 @@ const QuestionAnswerInfo: React.FC = () => {
                                                 </Select>
                                             </FormItem>
                                         </div>
-                                        <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
+                                        <div style={{display: 'flex', justifyContent: 'center', alignItems: 'center'}}>
                                             <FormItem
                                                 label='调用模型'
                                                 name="model"
-                                                rules={[{ required: true, message: '模型不能为空' }]}>
+                                                rules={[{required: true, message: '模型不能为空'}]}>
                                                 <Select
                                                     placeholder='请选择模型'
                                                     allowClear={true}
-                                                    style={{ width: '300px', height: '48px' }}
+                                                    style={{width: '300px', height: '48px'}}
+                                                    onChange={(value) => {
+                                                        if (value === 'Qwen3-30B') {
+                                                            setIsDeepThinkVisible(true);
+                                                        } else {
+                                                            setIsDeepThinkVisible(false);
+                                                        }
+                                                    }}
                                                 >
-                                                    <Option value='DeepSeek-R1-Distill-Llama-70B'>DeepSeek-R1-Distill-Llama-70B</Option>
+                                                    <Option value='Qwen3-30B'>Qwen3-30B</Option>
                                                     <Option value='Qwen2-72B'>Qwen2-72B</Option>
-                                                    {/* {
-                                                        modelList.map((item, index) => {
-                                                            return <Option value={item.value} key={index}>
-                                                                {item.label}
-                                                            </Option>
-                                                        })
-                                                    } */}
                                                 </Select>
-                                            </FormItem>
-                                        </div>
-                                        <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                            <FormItem
-                                                label='max token'
-                                                name='max_token'
-                                                rules={[{ required: true, message: 'max token不能为空' }]}>
-                                                <InputNumber
-                                                    className='questionAnswerInfo-content-title'
-                                                />
-                                            </FormItem>
-                                        </div>
 
-                                        {
-                                            !isVisible &&
-                                            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                                <a onClick={() => {
-                                                    setIsVisible(!isVisible);
-                                                }} className='questionAnswerInfo-content-title'>
-                                                    更多设置
-                                                </a>
+                                            </FormItem>
                                             </div>
-
-                                        }
-
-                                        {/* {isVisible && */}
-                                        <div style={{ display: isVisible ? 'block' : 'none', paddingTop: '20px' }}>
-                                            {isVisibleCus &&
-                                                <Space style={{ width: '100%' }} direction="vertical">
-                                                    <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                                        <FormItem
-                                                            label='Top-p'
-                                                            name='topP'
-                                                            style={{ width: '300px' }}
-                                                        >
-                                                            <TopPDecimalStep />
-                                                        </FormItem>
-                                                    </div>
-                                                    <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                                        <FormItem
-                                                            label='Temperature'
-                                                            name='temperature'
-                                                            style={{ width: '300px' }}
-                                                        >
-                                                            <TempDecimalStep />
-                                                        </FormItem>
-                                                    </div>
-                                                </Space >
-                                            }
-
-                                            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
+                                            <div style={{
+                                                display: isDeepThinkVisible  ? 'flex' : 'none',
+                                                justifyContent: 'center',
+                                                alignItems: 'center'
+                                            }}>
                                                 <FormItem
-                                                    label='回答风格'
-                                                    name='param_desc'
-                                                    rules={[{ required: true, message: '回答风格不能为空' }]}>
-                                                    <Radio.Group buttonStyle="solid"
-                                                        className='questionAnswerInfo-content-title'>
-                                                        <Radio.Button onClick={() => {
-                                                            handleRedioClick('strict')
-                                                        }} value='strict'>严谨</Radio.Button>
-                                                        <Radio.Button onClick={() => {
-                                                            handleRedioClick('moderate')
-                                                        }} value='moderate'>适中</Radio.Button>
-                                                        <Radio.Button onClick={() => {
-                                                            handleRedioClick('flexib')
-                                                        }} value='flexib'>发散</Radio.Button>
-                                                        <Radio.Button value='custom'
-                                                            onClick={() => {
-                                                                setIsVisibleCus(!isVisibleCus);
-                                                                setTopPValue(0.1);
-                                                                setTempValue(0.01);
-                                                            }}
-                                                        >自定义
-                                                        </Radio.Button>
+                                                    label='深度思考'
+                                                    name='isDeepThink'
+                                                    rules={[{ required: true, message: '请选择是否深度思考' }]}>
+                                                    <Radio.Group buttonStyle="solid" style={{width: '300px'}}>
+                                                        <Radio.Button value='Y'>是</Radio.Button>
+                                                        <Radio.Button value='N'>否</Radio.Button>
                                                     </Radio.Group>
                                                 </FormItem>
                                             </div>
-                                            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
+                                            <div style={{
+                                                display: 'flex',
+                                                justifyContent: 'center',
+                                                alignItems: 'center'
+                                            }}>
                                                 <FormItem
-                                                    label='展示引用知识'
-                                                    name='show_recall_result'
-                                                    className='questionAnswerInfo-content-title'>
-                                                    <Switch onChange={onChangeShow} />
-                                                </FormItem>
-                                            </div>
-                                            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                                <FormItem
-                                                    label='召回方式'
-                                                    name='recall_method'
-                                                    rules={[{ required: true, message: '召回方式不能为空' }]}>
-
-                                                    <Radio.Group
-                                                        style={style}
-                                                        onChange={onChangeRecallMethod}
-                                                        options={[
-                                                            { value: 'embedding', label: '向量化检索' },
-                                                            { value: 'keyword', label: '关键词检索' },
-                                                            { value: 'mixed', label: '混合检索' },
-                                                        ]}
+                                                    label='max token'
+                                                    name='max_token'
+                                                    rules={[{required: true, message: 'max token不能为空'}]}>
+                                                    <InputNumber
+                                                        className='questionAnswerInfo-content-title'
                                                     />
                                                 </FormItem>
                                             </div>
-                                            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                                <div className='questionAnswerInfo-content-title'>重排方式</div>
-                                            </div>
-                                            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                                <FormItem
-                                                    label='Rerank模型'
-                                                    name='rerank_status'
-                                                    valuePropName='checked'
-                                                    className='questionAnswerInfo-content-title'
-                                                >
-                                                    <Switch onChange={onChangeModel} />
-                                                </FormItem>
-                                            </div>
-                                            {isVisibleRerank &&
-                                                <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
+
+                                            {
+                                                !isVisible &&
+                                                <div style={{
+                                                    display: 'flex',
+                                                    justifyContent: 'center',
+                                                    alignItems: 'center'
+                                                }}>
+                                                    <a onClick={() => {
+                                                        setIsVisible(!isVisible);
+                                                    }} className='questionAnswerInfo-content-title'>
+                                                        更多设置
+                                                    </a>
+                                                </div>
+
+                                            }
+
+                                            {/* {isVisible && */}
+                                            <div style={{display: isVisible ? 'block' : 'none', paddingTop: '20px'}}>
+                                                {isVisibleCus &&
+                                                    <Space style={{width: '100%'}} direction="vertical">
+                                                        <div style={{
+                                                            display: 'flex',
+                                                            justifyContent: 'center',
+                                                            alignItems: 'center'
+                                                        }}>
+                                                            <FormItem
+                                                                label='Top-p'
+                                                                name='topP'
+                                                                style={{width: '300px'}}
+                                                            >
+                                                                <TopPDecimalStep/>
+                                                            </FormItem>
+                                                        </div>
+                                                        <div style={{
+                                                            display: 'flex',
+                                                            justifyContent: 'center',
+                                                            alignItems: 'center'
+                                                        }}>
+                                                            <FormItem
+                                                                label='Temperature'
+                                                                name='temperature'
+                                                                style={{width: '300px'}}
+                                                            >
+                                                                <TempDecimalStep/>
+                                                            </FormItem>
+                                                        </div>
+                                                    </Space>
+                                                }
+
+                                                <div style={{
+                                                    display: 'flex',
+                                                    justifyContent: 'center',
+                                                    alignItems: 'center'
+                                                }}>
+                                                    <FormItem
+                                                        label='回答风格'
+                                                        name='param_desc'
+                                                        rules={[{required: true, message: '回答风格不能为空'}]}>
+                                                        <Radio.Group buttonStyle="solid"
+                                                                     className='questionAnswerInfo-content-title'>
+                                                            <Radio.Button onClick={() => {
+                                                                handleRedioClick('strict')
+                                                            }} value='strict'>严谨</Radio.Button>
+                                                            <Radio.Button onClick={() => {
+                                                                handleRedioClick('moderate')
+                                                            }} value='moderate'>适中</Radio.Button>
+                                                            <Radio.Button onClick={() => {
+                                                                handleRedioClick('flexib')
+                                                            }} value='flexib'>发散</Radio.Button>
+                                                            <Radio.Button value='custom'
+                                                                          onClick={() => {
+                                                                              setIsVisibleCus(!isVisibleCus);
+                                                                              setTopPValue(0.1);
+                                                                              setTempValue(0.01);
+                                                                          }}
+                                                            >自定义
+                                                            </Radio.Button>
+                                                        </Radio.Group>
+                                                    </FormItem>
+                                                </div>
+                                                <div style={{
+                                                    display: 'flex',
+                                                    justifyContent: 'center',
+                                                    alignItems: 'center'
+                                                }}>
+                                                    <FormItem
+                                                        label='展示引用知识'
+                                                        name='show_recall_result'
+                                                        className='questionAnswerInfo-content-title'>
+                                                        <Switch onChange={onChangeShow}/>
+                                                    </FormItem>
+                                                </div>
+                                                <div style={{
+                                                    display: 'flex',
+                                                    justifyContent: 'center',
+                                                    alignItems: 'center'
+                                                }}>
                                                     <FormItem
-                                                        label='模型选择'
-                                                        name='rerank_model_name'
+                                                        label='召回方式'
+                                                        name='recall_method'
+                                                        rules={[{required: true, message: '召回方式不能为空'}]}>
+
+                                                        <Radio.Group
+                                                            style={style}
+                                                            onChange={onChangeRecallMethod}
+                                                            options={[
+                                                                {value: 'embedding', label: '向量化检索'},
+                                                                {value: 'keyword', label: '关键词检索'},
+                                                                {value: 'mixed', label: '混合检索'},
+                                                            ]}
+                                                        />
+                                                    </FormItem>
+                                                </div>
+                                                <div style={{
+                                                    display: 'flex',
+                                                    justifyContent: 'center',
+                                                    alignItems: 'center'
+                                                }}>
+                                                    <div className='questionAnswerInfo-content-title'>重排方式</div>
+                                                </div>
+                                                <div style={{
+                                                    display: 'flex',
+                                                    justifyContent: 'center',
+                                                    alignItems: 'center'
+                                                }}>
+                                                    <FormItem
+                                                        label='Rerank模型'
+                                                        name='rerank_status'
+                                                        valuePropName='checked'
+                                                        className='questionAnswerInfo-content-title'
                                                     >
-                                                        <Select
-                                                            style={{ width: '300px', height: '48px' }}
-                                                            placeholder='请选择模型'
-                                                        // defaultValue={'rerank'}
+                                                        <Switch onChange={onChangeModel}/>
+                                                    </FormItem>
+                                                </div>
+                                                {isVisibleRerank &&
+                                                    <div style={{
+                                                        display: 'flex',
+                                                        justifyContent: 'center',
+                                                        alignItems: 'center'
+                                                    }}>
+                                                        <FormItem
+                                                            label='模型选择'
+                                                            name='rerank_model_name'
                                                         >
-                                                            <Option value='rerank'>默认rerank模型</Option>
+                                                            <Select
+                                                                style={{width: '300px', height: '48px'}}
+                                                                placeholder='请选择模型'
+                                                                // defaultValue={'rerank'}
+                                                            >
+                                                                <Option value='rerank'>默认rerank模型</Option>
+                                                            </Select>
+                                                        </FormItem>
+                                                    </div>
+                                                }
+                                                <div style={{
+                                                    display: 'flex',
+                                                    justifyContent: 'center',
+                                                    alignItems: 'center'
+                                                }}>
+                                                    <FormItem
+                                                        label='召回切片数量'
+                                                        name='slice_config_type'
+                                                        rules={[{required: true, message: '召回方式不能为空'}]}>
+                                                        <Select
+                                                            style={{width: '300px', height: '48px'}}
+                                                            placeholder='请选择'
+                                                            onChange={onChangeCount}>
+                                                            <Option value="fixed">手动设置</Option>
+                                                            <Option value="customized">自动设置</Option>
                                                         </Select>
                                                     </FormItem>
                                                 </div>
-                                            }
-                                            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                                <FormItem
-                                                    label='召回切片数量'
-                                                    name='slice_config_type'
-                                                    rules={[{ required: true, message: '召回方式不能为空' }]}>
-                                                    <Select
-                                                        style={{ width: '300px', height: '48px' }}
-                                                        placeholder='请选择'
-                                                        onChange={onChangeCount}>
-                                                        <Option value="fixed">手动设置</Option>
-                                                        <Option value="customized">自动设置</Option>
-                                                    </Select>
-                                                </FormItem>
-                                            </div>
 
-                                            {isVisibleSlice &&
-                                                <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
+                                                {isVisibleSlice &&
+                                                    <div style={{
+                                                        display: 'flex',
+                                                        justifyContent: 'center',
+                                                        alignItems: 'center'
+                                                    }}>
+                                                        <FormItem
+                                                            label='召回切片数'
+                                                            name='slice_count'
+                                                            rules={[{required: true, message: '切片数不能为空'}]}>
+                                                            <InputNumber max={1024} changeOnWheel
+                                                                         className='questionAnswerInfo-content-title'/>
+                                                        </FormItem>
+                                                    </div>
+                                                }
+                                                <div style={{
+                                                    display: 'flex',
+                                                    justifyContent: 'center',
+                                                    alignItems: 'center'
+                                                }}>
                                                     <FormItem
-                                                        label='召回切片数'
-                                                        name='slice_count'
-                                                        rules={[{ required: true, message: '切片数不能为空' }]}>
-                                                        <InputNumber max={1024} changeOnWheel className='questionAnswerInfo-content-title' />
+                                                        label='召回切片拼接方式'
+                                                        name='recall_slice_splicing_method'
+                                                    >
+                                                        <TextArea
+                                                            rows={4}
+                                                            className='questionAnswerInfo-content-title'
+                                                            placeholder="请输入内容"
+                                                        />
                                                     </FormItem>
                                                 </div>
-                                            }
-                                            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
-                                                <FormItem
-                                                    label='召回切片拼接方式'
-                                                    name='recall_slice_splicing_method'
-                                                >
-                                                    <TextArea
-                                                        rows={4}
-                                                        className='questionAnswerInfo-content-title'
-                                                        placeholder="请输入内容"
-                                                    />
-                                                </FormItem>
                                             </div>
+                                            {/* } */}
                                         </div>
-                                        {/* } */}
                                     </div>
-                                </div>
                             </Splitter.Panel>
                         </Splitter>
                     </div>
@@ -882,4 +968,4 @@ const QuestionAnswerInfo: React.FC = () => {
     );
 };
 
-export default observer(QuestionAnswerInfo);
+export default observer(QuestionAnswerInfo);

+ 58 - 14
src/router.tsx

@@ -1,7 +1,13 @@
-import { lazy, Suspense } from 'react';
-import { RouteObject, Navigate, createBrowserRouter, useLocation } from 'react-router-dom';
-import { Spin } from 'antd';
+import { lazy, Suspense ,useEffect} from 'react';
+import {
+    RouteObject,
+    Navigate,
+    createBrowserRouter,
+    useLocation,
+    Routes} from 'react-router-dom';
+import { Spin,Modal } from 'antd';
 import LocalStorage from '@/LocalStorage';
+import { apis, LoginApiParams } from '@/apis';
 
 // 按需加载
 const lazyLoad = (loader: () => Promise<any>) => {
@@ -22,6 +28,8 @@ const lazyLoad = (loader: () => Promise<any>) => {
     );
 };
 
+// 定义登录地址常量
+const loginUrl = 'http://esc.sribs.com.cn:8080/esc-sso/oauth2.0/authorize?client_id=e97f94cf93761f4d69e8&response_type=code';
 // React-Router-Dom@v6 路由表
 const routerList: RouteObject[] = [
     {
@@ -212,7 +220,7 @@ const routerList: RouteObject[] = [
     },
     {   /* 登录 */
         path: '/login',
-        element: lazyLoad(() => import('@/pages/login/index')),
+        element: lazyLoad(() => import('@/pages/login/index'))
     }
 ]
 
@@ -235,20 +243,56 @@ router.routes.forEach((route: any) => {
         const path = location.pathname;
 
         if (LocalStorage.getToken()) {// 已登录
-            if (whiteList.includes(path)) {
-                return <Navigate to='/404' replace={true} />
-            } else {
-                return <>{component}</>
-            }
+            return <>{component}</>
         } else {// 未登录
-            if (whiteList.includes(path)) {
-                return <>{component}</>
-            } else {
-                return <Navigate to='/login' replace={true} />
+
+            const jkLogin = async (data: { code: string, redirectUrl: string }, url: string) => {
+                try {
+                    const res = await apis.jklogin(data);
+                    console.log(res.data,"res.data");
+                    localStorage.setItem('token', res.data.token);
+                    window.location.replace(url);
+                } catch (error: any) {
+                    Modal.error({
+                        title: '登录失败',
+                        content: error.msg,
+                    })
+                }
             }
+
+            const originUrl = window.location.origin;
+            const fullUrl = window.location.href;
+            const urlParams = new URLSearchParams(new URL(fullUrl).search);
+            const code = urlParams.get('code');
+            const state = urlParams.get('state');
+            const userInfo = localStorage.getItem('userInfo');
+
+            if (fullUrl.includes(originUrl + '/?code') && code && state) {// 通过code登陆
+                if (!userInfo) {
+                    jkLogin({ code: code, redirectUrl: encodeURIComponent(originUrl) }, state);
+                }
+            }
+            else {
+                //测试环境
+                //const loginUrl = 'https://esctest.sribs.com.cn/esc-sso/oauth2.0/authorize?client_id=e97f94cf93761f4d69e8&response_type=code';
+                //生产环境
+                const loginUrl = 'http://esc.sribs.com.cn:8080/esc-sso/oauth2.0/authorize?client_id=e97f94cf93761f4d69e8&response_type=code';
+                const externalLoginUrl = loginUrl + `&redirect_uri=${encodeURIComponent(originUrl)}&state=${encodeURIComponent(fullUrl)}`;
+                if (!userInfo) {
+                    window.location.replace(externalLoginUrl);
+                }
+            }
+            // else {// 未登录
+            //     if (whiteList.includes(path)) {
+            //         return <>{component}</>
+            //     } else {
+            //         return <Navigate to='/login' replace={true} />
+            //     }
+            // }
+
         }
     }
     route.element = <RouterComponent component={route.element} />
 });
 
-export default router;
+export default router;