mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-17 05:54:19 +01:00
feat: profile update
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { createSignal, type Signal } from 'solid-js';
|
||||
import { createSignal } from 'solid-js';
|
||||
|
||||
type ModalState =
|
||||
| { type: 'Profile'; pubkey: string }
|
||||
| { type: 'ProfileEdit' }
|
||||
| { type: 'UserTimeline'; pubkey: string }
|
||||
| { type: 'Closed' };
|
||||
|
||||
@@ -11,10 +12,13 @@ const useModalState = () => {
|
||||
const showProfile = (pubkey: string) => {
|
||||
setModalState({ type: 'Profile', pubkey });
|
||||
};
|
||||
const showProfileEdit = () => {
|
||||
setModalState({ type: 'ProfileEdit' });
|
||||
};
|
||||
const closeModal = () => {
|
||||
setModalState({ type: 'Closed' });
|
||||
};
|
||||
return { modalState, setModalState, showProfile, closeModal };
|
||||
return { modalState, setModalState, showProfile, showProfileEdit, closeModal };
|
||||
};
|
||||
|
||||
export default useModalState;
|
||||
|
||||
Reference in New Issue
Block a user