Merge pull request #660 from IsaacWise06/issue-646
fix(collections): Redirect to dashboard or login for non-public collections
This commit is contained in:
@@ -71,7 +71,13 @@ export default function PublicCollections() {
|
||||
|
||||
useEffect(() => {
|
||||
if (router.query.id) {
|
||||
getPublicCollectionData(Number(router.query.id), setCollection);
|
||||
getPublicCollectionData(Number(router.query.id), setCollection).then(
|
||||
(res) => {
|
||||
if (res.status === 400) {
|
||||
router.push("/dashboard");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}, [collections]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user