mirror of https://gitee.com/answerdev/answer.git
24 lines
373 B
TypeScript
24 lines
373 B
TypeScript
import create from 'zustand';
|
|
|
|
interface NotFoundType {
|
|
visible: boolean;
|
|
show: () => void;
|
|
hide: () => void;
|
|
}
|
|
|
|
const notFound = create<NotFoundType>((set) => ({
|
|
visible: false,
|
|
show: () => {
|
|
set(() => {
|
|
return { visible: true };
|
|
});
|
|
},
|
|
hide: () => {
|
|
set(() => {
|
|
return { visible: false };
|
|
});
|
|
},
|
|
}));
|
|
|
|
export default notFound;
|