Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fetchEmails = async () => {
- const res = await fetch('/api/admin/get-emails');
- if(res.ok){
- const {emails} = await res.json();
- setEmails(emails)
- }else{
- const err = await res.json();
- if(err.location){
- window.location.href = err.location
- }else{
- alert('DAFIQSIRDA SHECDOMA');
- };
- };
- };
- useEffect(()=>{
- fetchEmails()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement