feat(client): add product hunt announcement banner

This commit is contained in:
Amruth Pillai 2022-03-12 15:19:19 +01:00
parent d7268423df
commit b515fc36e7
No known key found for this signature in database
GPG Key ID: E3C57DF9B80855AD
4 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,7 @@
.container {
@apply z-10 fixed top-0 left-0 right-0;
strong {
@apply font-semibold;
}
}

View File

@ -0,0 +1,26 @@
import { AnnouncementOutlined } from '@mui/icons-material';
import { Alert, Collapse } from '@mui/material';
import { useState } from 'react';
import { PRODUCT_HUNT_URL } from '@/constants/index';
import styles from './Announcement.module.scss';
const Announcement = () => {
const [open, setOpen] = useState(true);
return (
<div className={styles.container}>
<Collapse in={open}>
<Alert icon={<AnnouncementOutlined />} severity="info" onClose={() => setOpen(false)}>
<a href={PRODUCT_HUNT_URL} target="_blank" rel="noreferrer">
<strong>Reactive Resume is featured on Product Hunt.</strong> If you liked this app, please show your
support by <strong>upvoting</strong>!
</a>
</Alert>
</Collapse>
</div>
);
};
export default Announcement;

View File

@ -11,4 +11,5 @@ export const FILENAME_TIMESTAMP = 'DDMMYYYYHHmmss';
// Links
export const DONATION_URL = 'https://www.buymeacoffee.com/AmruthPillai';
export const GITHUB_URL = 'https://github.com/AmruthPillai/Reactive-Resume';
export const PRODUCT_HUNT_URL = 'https://www.producthunt.com/posts/reactive-resume-v3';
export const GITHUB_ISSUES_URL = 'https://github.com/AmruthPillai/Reactive-Resume/issues/new/choose';

View File

@ -8,6 +8,7 @@ import { Trans, useTranslation } from 'next-i18next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Testimony from '@/components/landing/Testimony';
import Announcement from '@/components/shared/Announcement';
import Footer from '@/components/shared/Footer';
import LanguageSwitcher from '@/components/shared/LanguageSwitcher';
import Logo from '@/components/shared/Logo';
@ -44,6 +45,8 @@ const Home: NextPage = () => {
return (
<main className={styles.container}>
<Announcement />
<div className={styles.header}>
<div className={styles.logo}>
<Logo size={256} />