diff --git a/web/src/pages/Authorize/index.tsx b/web/src/pages/Authorize/index.tsx index 1dcf7bf..fe4b9cd 100644 --- a/web/src/pages/Authorize/index.tsx +++ b/web/src/pages/Authorize/index.tsx @@ -1,7 +1,7 @@ -import { useCallback, type FC } from "react"; +import { useCallback, useEffect, type FC } from "react"; import { Card, CardContent } from "@/components/ui/card"; -import { ArrowLeftRight, ChevronDown } from "lucide-react"; +import { ArrowLeftRight, ChevronDown, LayoutDashboard } from "lucide-react"; import { Button } from "@/components/ui/button"; import Avatar from "@/feature/Avatar"; import { useAuth } from "@/store/auth"; @@ -13,6 +13,12 @@ const AuthorizePage: FC = () => { const profile = useAuth((state) => state.profile); + const fetchService = useOAuth((s) => s.fetchApiService); + const fetching = useOAuth((s) => s.fetching); + const clientId = useOAuth((s) => s.clientID); + + const apiService = useOAuth((s) => s.apiService); + const selectSession = useOAuth((state) => state.selectSession); const handleAgree = useCallback(() => { @@ -20,12 +26,44 @@ const AuthorizePage: FC = () => { selectSession(activeAccount.access); }, [activeAccount, selectSession]); + useEffect(() => { + if (clientId) { + fetchService(); + } + }, [clientId, fetchService]); + return (
- Are you sure you want to trust MDN Lab Services? + Are you sure you want to trust {apiService?.name ?? "service"} + ?
Please do not share any sensitive, personal, or unnecessary