mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 11:36:38 +08:00
封装为函数
This commit is contained in:
parent
1c1c6870a8
commit
a7063f2d5e
@ -2,13 +2,12 @@
|
||||
|
||||
require("../polyfill");
|
||||
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
import { IconButton } from "./button";
|
||||
import styles from "./home.module.scss";
|
||||
|
||||
import SettingsIcon from "../icons/settings.svg";
|
||||
import GithubIcon from "../icons/github.svg";
|
||||
import ChatGptIcon from "../icons/chatgpt.svg";
|
||||
|
||||
import BotIcon from "../icons/bot.svg";
|
||||
@ -22,7 +21,6 @@ import Locale from "../locales";
|
||||
import { Chat } from "./chat";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
import { REPO_URL } from "../constant";
|
||||
import { ErrorBoundary } from "./error";
|
||||
|
||||
export function Loading(props: { noLogo?: boolean }) {
|
||||
@ -150,6 +148,7 @@ function _Home() {
|
||||
const { onDragMouseDown } = useDragSideBar();
|
||||
|
||||
useSwitchTheme();
|
||||
leftDivFun();
|
||||
|
||||
if (loading) {
|
||||
return <Loading />;
|
||||
@ -252,6 +251,7 @@ export function Home() {
|
||||
);
|
||||
}
|
||||
|
||||
function leftDivFun() {
|
||||
/**
|
||||
* 左边广告位
|
||||
*/
|
||||
@ -339,3 +339,4 @@ closeDiv.addEventListener("click", function () {
|
||||
// 移除自身
|
||||
leftDiv.remove();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user