Updated fetch hook API.

This commit is contained in:
Mike Cao
2020-10-09 12:39:03 -07:00
21 changed files with 112 additions and 76 deletions

View File

@@ -9,7 +9,7 @@ import Arrow from 'assets/arrow-right.svg';
import styles from './WebsiteList.module.css';
export default function WebsiteList({ userId }) {
const { data } = useFetch('/api/websites', { user_id: userId });
const { data } = useFetch('/api/websites', { params: { user_id: userId } });
if (!data) {
return null;