mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-17 05:54:19 +01:00
feat: column customization
This commit is contained in:
@@ -4,6 +4,8 @@ type ModalState =
|
||||
| { type: 'Profile'; pubkey: string }
|
||||
| { type: 'ProfileEdit' }
|
||||
| { type: 'UserTimeline'; pubkey: string }
|
||||
| { type: 'AddColumn' }
|
||||
| { type: 'About' }
|
||||
| { type: 'Closed' };
|
||||
|
||||
const [modalState, setModalState] = createSignal<ModalState>({ type: 'Closed' });
|
||||
@@ -15,10 +17,24 @@ const useModalState = () => {
|
||||
const showProfileEdit = () => {
|
||||
setModalState({ type: 'ProfileEdit' });
|
||||
};
|
||||
const showAddColumn = () => {
|
||||
setModalState({ type: 'AddColumn' });
|
||||
};
|
||||
const showAbout = () => {
|
||||
setModalState({ type: 'About' });
|
||||
};
|
||||
const closeModal = () => {
|
||||
setModalState({ type: 'Closed' });
|
||||
};
|
||||
return { modalState, setModalState, showProfile, showProfileEdit, closeModal };
|
||||
return {
|
||||
modalState,
|
||||
setModalState,
|
||||
showProfile,
|
||||
showProfileEdit,
|
||||
showAddColumn,
|
||||
showAbout,
|
||||
closeModal,
|
||||
};
|
||||
};
|
||||
|
||||
export default useModalState;
|
||||
|
||||
Reference in New Issue
Block a user