279437ba08
* Admin page using gridjs * Move hook into separate file * Link to each user's Manifold and Firestore /user entry * Gate admin access to Austin/James/Stephen * Don't leak the existence of /admin * Add a custom 404 page that directs to Discord. * Fix broken window.location.href on NextJS server
13 lines
270 B
TypeScript
13 lines
270 B
TypeScript
import { useState, useEffect } from 'react'
|
|
import { listenForAllUsers, User } from '../lib/firebase/users'
|
|
|
|
export const useUsers = () => {
|
|
const [users, setUsers] = useState<User[]>([])
|
|
|
|
useEffect(() => {
|
|
listenForAllUsers(setUsers)
|
|
}, [])
|
|
|
|
return users
|
|
}
|