feat: column customization

This commit is contained in:
Shusui MOYATANI
2023-05-08 19:58:59 +09:00
parent 5b5c261285
commit f8fbc95ba7
49 changed files with 1178 additions and 307 deletions

View File

@@ -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;