mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
formatting
This commit is contained in:
1 parent
e48263838f
commit
3a1bd75f97
23 files changed
+309
-236
No files matched your search
@@ -6,11 +6,11 @@ export const contactsState = {
|
||||
default: [],
|
||||
}),
|
||||
showModal: atom({
|
||||
key: 'showModal',
|
||||
default: false
|
||||
key: "showModal",
|
||||
default: false,
|
||||
}),
|
||||
filterContacts: atom({
|
||||
key: 'filterContacts',
|
||||
default: ""
|
||||
})
|
||||
key: "filterContacts",
|
||||
default: "",
|
||||
}),
|
||||
};
|
||||
@@ -5,7 +5,7 @@ interface Contact {
|
||||
id: string;
|
||||
display: string;
|
||||
number: string;
|
||||
img?: string
|
||||
img?: string;
|
||||
}
|
||||
|
||||
interface IUseContacts {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { contactsState } from './state';
|
||||
import { useRecoilState } from "recoil";
|
||||
import { contactsState } from "./state";
|
||||
|
||||
export const useFilteredContacts = () => {
|
||||
const [ filteredContacts, setFilteredContacts ] = useRecoilState(contactsState.filterContacts);
|
||||
const [filteredContacts, setFilteredContacts] = useRecoilState(
|
||||
contactsState.filterContacts
|
||||
);
|
||||
return { filteredContacts, setFilteredContacts };
|
||||
}
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { contactsState } from './state';
|
||||
import { useRecoilState } from "recoil";
|
||||
import { contactsState } from "./state";
|
||||
|
||||
export const useModal = () => {
|
||||
const [ showModal, setShowModal ] = useRecoilState(contactsState.showModal);
|
||||
const [showModal, setShowModal] = useRecoilState(contactsState.showModal);
|
||||
return { showModal, setShowModal };
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user