feat: optiminize

This commit is contained in:
butterfly
2024-04-26 01:31:03 +08:00
parent 59583e53bd
commit 48e8c0a194
30 changed files with 304 additions and 263 deletions

View File

@@ -1,4 +1,3 @@
import useMobileScreen from "@/app/hooks/useMobileScreen";
import BotIcon from "@/app/icons/bot.svg";
import LoadingIcon from "@/app/icons/three-dots.svg";
@@ -16,15 +15,17 @@ export default function Loading({
theme = getCSSVar("--default-container-bg");
}
const isMobileScreen = useMobileScreen();
return (
<div
className={`flex flex-col justify-center items-center w-[100%] ${
isMobileScreen
? "h-[100%]"
: `my-2.5 ml-1 mr-2.5 rounded-md h-[calc(100%-1.25rem)]`
}`}
className={`
flex flex-col justify-center items-center w-[100%]
h-[100%]
md:my-2.5
md:ml-1
md:mr-2.5
md:rounded-md
md:h-[calc(100%-1.25rem)]
`}
style={{ background: useSkeleton ? theme : "" }}
>
{!noLogo && <BotIcon />}