This commit is contained in:
rex
2025-10-23 20:06:31 +08:00
parent 4fb4d5fd69
commit 2c34c157f1
7 changed files with 30 additions and 89 deletions

View File

@@ -1,40 +1,16 @@
import { useGlobalStore } from '@/store/global';
import './index.css';
import { isEmpty } from 'lodash-es';
import { EVENT, useMujian } from '@/providers/MujianProvider';
import { Button } from '@/components';
function Home() {
const { count, increment } = useGlobalStore((state) => state);
const mujian = useMujian();
console.log('count', count);
console.log('isEmpty', isEmpty(count));
return (
<>
<div>
<div className="text-3xl font-bold underline">Hello World2</div>
</div>
<h1>Vite + React</h1>
<button type="button" onClick={increment}>
Increment
</button>
<p>Count: {count}</p>
<br />
<button
type="button"
onClick={async () => {
mujian.emit(EVENT.MUJIAN_AI_CHAT_SEND_MESSAGE, {
message: 'Hello, World!',
});
}}
>
Hello
</button>
<Button>Click me</Button>
</>
);
}