Skip to content

Commit

Permalink
feat(client): add product hunt announcement banner
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Mar 12, 2022
1 parent d726842 commit b515fc3
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/components/shared/Announcement.module.scss
@@ -0,0 +1,7 @@
.container {
@apply z-10 fixed top-0 left-0 right-0;

strong {
@apply font-semibold;
}
}
26 changes: 26 additions & 0 deletions client/components/shared/Announcement.tsx
@@ -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;
1 change: 1 addition & 0 deletions client/constants/index.ts
Expand Up @@ -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';
3 changes: 3 additions & 0 deletions client/pages/index.tsx
Expand Up @@ -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';
Expand Down Expand Up @@ -44,6 +45,8 @@ const Home: NextPage = () => {

return (
<main className={styles.container}>
<Announcement />

<div className={styles.header}>
<div className={styles.logo}>
<Logo size={256} />
Expand Down

0 comments on commit b515fc3

Please sign in to comment.