diff --git a/client/app/github/installed/page.tsx b/client/app/github/installed/page.tsx index 8f889533..13705f1c 100644 --- a/client/app/github/installed/page.tsx +++ b/client/app/github/installed/page.tsx @@ -1,19 +1,47 @@ 'use client'; -import React from 'react'; +import React, { useState, useEffect } from 'react'; +import { Button } from '@nextui-org/react'; +import { useRouter } from 'next/navigation'; export default function GithubAppInstalled() { + const router = useRouter(); + const [countdown, setCountdown] = useState(5); + + useEffect(() => { + if (countdown > 0) { + const timer = setInterval(() => { + setCountdown((prevCountdown) => prevCountdown - 1); + }, 1000); + return () => clearInterval(timer); + } else { + redirectToLink(); + } + }, [countdown]); + + const redirectToLink = () => { + router.push('/factory/list'); + }; + + const handleClick = () => { + redirectToLink(); + }; + return (
-

+

Installation Approved

-

- Thank you for installing PeterCat's GitHub App! -

+

Thank you for installing PeterCat's GitHub App!

Your Team will now be able to use robots for your GitHub organization!

+
- ) + ); }