mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-20 04:30:17 +09:00
hide new chat button on sd page
This commit is contained in:
parent
d21481173e
commit
34034be0e3
@ -152,7 +152,7 @@ export function SideBar(props: { className?: string }) {
|
|||||||
useHotKey();
|
useHotKey();
|
||||||
|
|
||||||
let bodyComponent: React.JSX.Element;
|
let bodyComponent: React.JSX.Element;
|
||||||
let isChat: boolean;
|
let isChat: boolean = false;
|
||||||
switch (location.pathname) {
|
switch (location.pathname) {
|
||||||
case Path.Sd:
|
case Path.Sd:
|
||||||
bodyComponent = <SdList />;
|
bodyComponent = <SdList />;
|
||||||
@ -161,6 +161,7 @@ export function SideBar(props: { className?: string }) {
|
|||||||
isChat = true;
|
isChat = true;
|
||||||
bodyComponent = <ChatList narrow={shouldNarrow} />;
|
bodyComponent = <ChatList narrow={shouldNarrow} />;
|
||||||
}
|
}
|
||||||
|
// @ts-ignore
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`${styles.sidebar} ${props.className} ${
|
className={`${styles.sidebar} ${props.className} ${
|
||||||
@ -240,6 +241,7 @@ export function SideBar(props: { className?: string }) {
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{isChat && (
|
||||||
<div>
|
<div>
|
||||||
<IconButton
|
<IconButton
|
||||||
icon={<AddIcon />}
|
icon={<AddIcon />}
|
||||||
@ -255,6 +257,7 @@ export function SideBar(props: { className?: string }) {
|
|||||||
shadow
|
shadow
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
Loading…
Reference in New Issue
Block a user