Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
95066262
authored
Jun 26, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
close ssr query
parent
deb9be41
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
30 deletions
+10
-30
client/src/pages/chat/index.tsx
+2
-8
client/src/pages/chat/share.tsx
+2
-8
client/src/pages/index.tsx
+2
-0
client/src/pages/kb/index.tsx
+2
-7
client/src/pages/model/index.tsx
+2
-7
No files found.
client/src/pages/chat/index.tsx
View file @
95066262
...
@@ -63,8 +63,9 @@ import { adaptChatItem_openAI } from '@/utils/plugin/openai';
...
@@ -63,8 +63,9 @@ import { adaptChatItem_openAI } from '@/utils/plugin/openai';
const
textareaMinH
=
'22px'
;
const
textareaMinH
=
'22px'
;
const
Chat
=
(
{
modelId
,
chatId
}:
{
modelId
:
string
;
chatId
:
string
}
)
=>
{
const
Chat
=
()
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
modelId
=
''
,
chatId
=
''
}
=
router
.
query
as
{
modelId
:
string
;
chatId
:
string
};
const
theme
=
useTheme
();
const
theme
=
useTheme
();
const
ChatBox
=
useRef
<
HTMLDivElement
>
(
null
);
const
ChatBox
=
useRef
<
HTMLDivElement
>
(
null
);
...
@@ -950,11 +951,4 @@ const Chat = ({ modelId, chatId }: { modelId: string; chatId: string }) => {
...
@@ -950,11 +951,4 @@ const Chat = ({ modelId, chatId }: { modelId: string; chatId: string }) => {
);
);
};
};
Chat
.
getInitialProps
=
({
query
,
req
}:
any
)
=>
{
return
{
modelId
:
query
?.
modelId
||
''
,
chatId
:
query
?.
chatId
||
''
};
};
export
default
Chat
;
export
default
Chat
;
client/src/pages/chat/share.tsx
View file @
95066262
...
@@ -60,8 +60,9 @@ import { adaptChatItem_openAI } from '@/utils/plugin/openai';
...
@@ -60,8 +60,9 @@ import { adaptChatItem_openAI } from '@/utils/plugin/openai';
const
textareaMinH
=
'22px'
;
const
textareaMinH
=
'22px'
;
const
Chat
=
(
{
shareId
,
historyId
}:
{
shareId
:
string
;
historyId
:
string
}
)
=>
{
const
Chat
=
()
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
shareId
=
''
,
historyId
=
''
}
=
router
.
query
as
{
shareId
:
string
;
historyId
:
string
};
const
theme
=
useTheme
();
const
theme
=
useTheme
();
const
ChatBox
=
useRef
<
HTMLDivElement
>
(
null
);
const
ChatBox
=
useRef
<
HTMLDivElement
>
(
null
);
...
@@ -837,11 +838,4 @@ const Chat = ({ shareId, historyId }: { shareId: string; historyId: string }) =>
...
@@ -837,11 +838,4 @@ const Chat = ({ shareId, historyId }: { shareId: string; historyId: string }) =>
);
);
};
};
Chat
.
getInitialProps
=
({
query
,
req
}:
any
)
=>
{
return
{
shareId
:
query
?.
shareId
||
''
,
historyId
:
query
?.
historyId
||
''
};
};
export
default
Chat
;
export
default
Chat
;
client/src/pages/index.tsx
View file @
95066262
...
@@ -140,8 +140,10 @@ const Home = () => {
...
@@ -140,8 +140,10 @@ const Home = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
(
async
()
=>
{
(
async
()
=>
{
try
{
const
{
data
:
git
}
=
await
axios
.
get
(
'https://api.github.com/repos/c121914yu/FastGPT'
);
const
{
data
:
git
}
=
await
axios
.
get
(
'https://api.github.com/repos/c121914yu/FastGPT'
);
setStar
(
git
.
stargazers_count
);
setStar
(
git
.
stargazers_count
);
}
catch
(
error
)
{}
})();
})();
},
[]);
},
[]);
...
...
client/src/pages/kb/index.tsx
View file @
95066262
...
@@ -7,8 +7,9 @@ import SideBar from '@/components/SideBar';
...
@@ -7,8 +7,9 @@ import SideBar from '@/components/SideBar';
import
KbList
from
'./components/KbList'
;
import
KbList
from
'./components/KbList'
;
import
KbDetail
from
'./components/Detail'
;
import
KbDetail
from
'./components/Detail'
;
const
Kb
=
(
{
kbId
}:
{
kbId
:
string
}
)
=>
{
const
Kb
=
()
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
kbId
=
''
}
=
router
.
query
as
{
kbId
:
string
};
const
{
isPc
}
=
useGlobalStore
();
const
{
isPc
}
=
useGlobalStore
();
const
{
lastKbId
}
=
useUserStore
();
const
{
lastKbId
}
=
useUserStore
();
...
@@ -35,9 +36,3 @@ const Kb = ({ kbId }: { kbId: string }) => {
...
@@ -35,9 +36,3 @@ const Kb = ({ kbId }: { kbId: string }) => {
};
};
export
default
Kb
;
export
default
Kb
;
Kb
.
getInitialProps
=
({
query
,
req
}:
any
)
=>
{
return
{
kbId
:
query
?.
kbId
||
''
};
};
client/src/pages/model/index.tsx
View file @
95066262
...
@@ -13,8 +13,9 @@ const ModelDetail = dynamic(() => import('./components/detail/index'), {
...
@@ -13,8 +13,9 @@ const ModelDetail = dynamic(() => import('./components/detail/index'), {
ssr
:
false
ssr
:
false
});
});
const
Model
=
(
{
modelId
}:
{
modelId
:
string
}
)
=>
{
const
Model
=
()
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
modelId
=
''
}
=
router
.
query
as
{
modelId
:
string
};
const
{
isPc
}
=
useGlobalStore
();
const
{
isPc
}
=
useGlobalStore
();
const
{
lastModelId
}
=
useUserStore
();
const
{
lastModelId
}
=
useUserStore
();
...
@@ -41,9 +42,3 @@ const Model = ({ modelId }: { modelId: string }) => {
...
@@ -41,9 +42,3 @@ const Model = ({ modelId }: { modelId: string }) => {
};
};
export
default
Model
;
export
default
Model
;
Model
.
getInitialProps
=
({
query
,
req
}:
any
)
=>
{
return
{
modelId
:
query
?.
modelId
||
''
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment