18 lines
484 B
TypeScript
18 lines
484 B
TypeScript
import { Button } from '@/components/ui/button';
|
|
import { useCharacterDialog } from './character-dialog-context';
|
|
|
|
export function CharactersPrimaryButtons() {
|
|
const { setOpen, setCharacter } = useCharacterDialog();
|
|
|
|
const handleCreate = () => {
|
|
setCharacter(null); // Clear character for creation
|
|
setOpen(true);
|
|
};
|
|
|
|
return (
|
|
<div className='flex gap-2'>
|
|
<Button onClick={handleCreate}>创建角色</Button>
|
|
</div>
|
|
);
|
|
}
|