From 09399ce6e0ce1faaca5cbf45023d37a6001be7b5 Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Tue, 2 May 2023 08:33:02 -0700 Subject: [PATCH] Redirect if not allowed ai (#3300) --- .../src/pages/ai-attributed-tracks-page/AiPageProvider.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/audius-client/packages/web/src/pages/ai-attributed-tracks-page/AiPageProvider.tsx b/apps/audius-client/packages/web/src/pages/ai-attributed-tracks-page/AiPageProvider.tsx index 67abdee6621..9ae35f11aad 100644 --- a/apps/audius-client/packages/web/src/pages/ai-attributed-tracks-page/AiPageProvider.tsx +++ b/apps/audius-client/packages/web/src/pages/ai-attributed-tracks-page/AiPageProvider.tsx @@ -78,6 +78,12 @@ const AiPageProvider = ({ } }, [goToRoute, user]) + useEffect(() => { + if (user && !user.allow_ai_attribution) { + goToRoute(profilePage(user?.handle)) + } + }, [user, goToRoute]) + const getLineupProps = () => { return { selfLoad: true,