mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-09 18:27:56 +08:00
format code
This commit is contained in:
@@ -18,16 +18,14 @@ function App() {
|
||||
}, [globalConfLoaded]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{ globalConfLoaded
|
||||
globalConfLoaded
|
||||
&& (
|
||||
<Routes>
|
||||
<Route path="/auth/:code" element={<Auth />} />
|
||||
<Route path="/unauthed" element={<Unauthed />} />
|
||||
<Route path="/home" element={<Home />} />
|
||||
</Routes>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,11 +14,12 @@ export default function Auth() {
|
||||
dispatch(login(code));
|
||||
}
|
||||
}, [isLogin, code]);
|
||||
return (
|
||||
{ isLogin
|
||||
? <Navigate to="/home" />
|
||||
: isFailed
|
||||
? <Navigate to="/unauthed" />
|
||||
: <div> login </div>}
|
||||
);
|
||||
|
||||
if (isLogin) {
|
||||
return <Navigate to="/home" />;
|
||||
}
|
||||
if (isFailed) {
|
||||
return <Navigate to="/unauthed" />;
|
||||
}
|
||||
return <div> login </div>;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import React from 'react';
|
||||
import { SubscribeResp } from '../../utils/type';
|
||||
import { useGetSubsQuery } from './subscribeConfigSlice';
|
||||
|
||||
export function SubscribeManager() {
|
||||
const {
|
||||
data: subs,
|
||||
isLoading,
|
||||
isFetching,
|
||||
isSuccess,
|
||||
} = useGetSubsQuery();
|
||||
export default function SubscribeManager() {
|
||||
return (
|
||||
<>
|
||||
</>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';
|
||||
import { RootState } from '../../app/store';
|
||||
import { StatusResp, SubscribeResp, SubscribeConfig } from '../../utils/type';
|
||||
import { subsribeUrl } from '../../utils/urls';
|
||||
import { createApi } from '@reduxjs/toolkit/query/react';
|
||||
import { StatusResp, SubscribeConfig, SubscribeResp } from '../../utils/type';
|
||||
import { baseQueryWithAuth } from '../auth/authQuery';
|
||||
|
||||
export const subscribeApi = createApi({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { SubscribeManager } from '../features/subsribeConfigManager/SubscribeManager';
|
||||
import SubscribeManager from '../features/subsribeConfigManager/SubscribeManager';
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user