From 3635228171a81759160ede11db66cd91c50c2cdc Mon Sep 17 00:00:00 2001 From: Piotr Rogowski Date: Sat, 29 Oct 2022 19:48:21 +0200 Subject: [PATCH] Add `About` page --- src/App.tsx | 2 ++ src/components/TopBar.tsx | 16 ++++++++++++- src/css/App.less | 8 +++---- src/pages/About.tsx | 49 +++++++++++++++++++++++++++++++++++++++ src/routes.ts | 2 ++ 5 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 src/pages/About.tsx diff --git a/src/App.tsx b/src/App.tsx index bb4df92..9a7e303 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -62,6 +62,7 @@ const ResetPassword = lazy(() => import('./pages/auth/ResetPassword')); const ResetPasswordConfirmation = lazy(() => import('./pages/auth/ResetPasswordConfirmation')); const EmailVerification = lazy(() => import('./pages/auth/EmailVerification')); const OauthCallback = lazy(() => import('./pages/auth/OauthCallback')); +const About = lazy(() => import('./pages/About')); const { Content } = Layout; @@ -200,6 +201,7 @@ const App = ({ ui, tuneData }: { ui: UIState, tuneData: TuneDataState }) => { } />} /> } />} /> } />} /> + } />} /> } />} /> } />} /> diff --git a/src/components/TopBar.tsx b/src/components/TopBar.tsx index a4eb93d..c46bd9e 100644 --- a/src/components/TopBar.tsx +++ b/src/components/TopBar.tsx @@ -226,7 +226,7 @@ const TopBar = ({ return list.length ? list : null; }, [lg, sm]); - const userMenuItems = useMemo(() => currentUser ? [{ + const userAuthMenuItems = useMemo(() => currentUser ? [{ key: 'profile', icon: , label: 'Profile', @@ -248,6 +248,20 @@ const TopBar = ({ onClick: () => navigate(Routes.SIGN_UP), }], [currentUser, logoutClick, navigate]); + const userMenuItems = [ + ...userAuthMenuItems, + { + key: 'divider', + type: 'divider', + }, + { + key: 'about', + icon: , + label: 'About', + onClick: () => navigate(Routes.ABOUT), + }, + ]; + return (
diff --git a/src/css/App.less b/src/css/App.less index 62594f5..36fb0a5 100644 --- a/src/css/App.less +++ b/src/css/App.less @@ -46,10 +46,6 @@ html, body { a:hover { text-decoration: underline; } - - .github-link { - animation: wiggle 2s linear 2; - } } .app-sidebar { @@ -194,3 +190,7 @@ select:-webkit-autofill:focus { resize: none; } } + +.sponsor-button { + animation: wiggle 2s linear 1; +} diff --git a/src/pages/About.tsx b/src/pages/About.tsx new file mode 100644 index 0000000..094005a --- /dev/null +++ b/src/pages/About.tsx @@ -0,0 +1,49 @@ +import { + Button, + Result, +} from 'antd'; +import { + HeartOutlined, + GithubOutlined, +} from '@ant-design/icons'; +import hyperIcon from '../../public/icons/icon.png'; + +const About = () => ( +
+ } + title={ + <> + Powered by HyperTuner + + } + subTitle={ + <> + Created with by Piotr Rogowski, + licensed under MIT. + + } + extra={[ + , + , + ]} + /> +
+); + +export default About; diff --git a/src/routes.ts b/src/routes.ts index 0aa6c46..08b5022 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -25,5 +25,7 @@ export enum Routes { EMAIL_VERIFICATION = '/auth/email-verification/:token', OAUTH_CALLBACK = '/auth/oauth-callback/:provider', + ABOUT = '/about', + REDIRECT_PAGE_OAUTH_CALLBACK = 'oauth', }