This commit is contained in:
rex
2025-10-23 16:31:00 +08:00
parent a5d7f6df0e
commit 8d63b1e80b
8 changed files with 88 additions and 87 deletions

View File

@@ -4,39 +4,39 @@ import { isEmpty } from 'lodash-es';
import { EVENT, useMujian } from '@/providers/MujianProvider';
function Home() {
const { count, increment } = useGlobalStore((state) => state);
const mujian = useMujian();
const { count, increment } = useGlobalStore((state) => state);
const mujian = useMujian();
console.log('count', count);
console.log('count', count);
console.log('isEmpty', isEmpty(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>
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>
<p>Count: {count}</p>
<br />
<br />
<button
type="button"
onClick={async () => {
mujian.emit(EVENT.MUJIAN_AI_CHAT_SEND_MESSAGE, {
message: 'Hello, World!',
});
}}
>
Hello
</button>
</>
);
<button
type="button"
onClick={async () => {
mujian.emit(EVENT.MUJIAN_AI_CHAT_SEND_MESSAGE, {
message: 'Hello, World!',
});
}}
>
Hello
</button>
</>
);
}
export default Home;