Skip to content

Commit

Permalink
Merge pull request #568 from cofacts/revert-567-mgp
Browse files Browse the repository at this point in the history
Revert "feat: apply notification and footer banner to website pages"
  • Loading branch information
MrOrz committed Apr 11, 2024
2 parents 734ee25 + 916c240 commit 098ec82
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 29 deletions.
22 changes: 2 additions & 20 deletions components/AppLayout/AppLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,11 @@ const USER_QUERY = gql`
${AppHeader.fragments.AppHeaderUserData}
`;

const useStyles = makeStyles(theme => ({
const useStyles = makeStyles({
container: {
flex: 1,
},
mgp: {
color: '#fff',
background: theme.palette.secondary[500],
display: 'flex',
gap: 8,
padding: 8,
justifyContent: 'center',
'& > a': {
color: theme.palette.primary[500],
},
},
}));
});

const apiLogout = () => {
return fetchAPI('/logout').then(resp => resp.json());
Expand Down Expand Up @@ -97,13 +86,6 @@ function AppLayout({ children, container = true }) {

return (
<Fragment>
<div className={classes.mgp}>
🏆 謠言惑眾獎 🏆 投票到 4/12 唷!
<a href="https://www.mygopen.com/p/award_22.html?utm_source=cofacts&utm_medium=site-notif">
活動詳情
</a>
<a href="https://cofacts.tw/mgp">用 LINE 投票去</a>
</div>
<AppHeader
user={data?.GetUser}
showProgress={isRouteChanging}
Expand Down
15 changes: 6 additions & 9 deletions pages/article/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ import CooccurrenceSection, {
fragments as CooccurrenceSectionFragments,
} from 'components/CooccurrenceSection';

const MGP_URL =
'https://www.mygopen.com/p/award_22.html??utm_source=cofacts&utm_medium=footer';

const useStyles = makeStyles(theme => ({
root: {
display: 'flex',
Expand Down Expand Up @@ -565,11 +562,11 @@ function ArticlePage() {
)}

<Hidden smDown implementation="css">
<a href={MGP_URL}>
<a href={LINE_URL}>
<img
className={classes.bannerImage}
src="/mgp.jpg"
alt="第四屆謠言惑眾獎投票中!"
src="/line-banner-desktop@2x.png"
alt={t`Add Cofacts as friend in LINE`}
/>
</a>
</Hidden>
Expand Down Expand Up @@ -623,11 +620,11 @@ function ArticlePage() {
</Box>
</div>
<Hidden mdUp implementation="css">
<a href={MGP_URL}>
<a href={LINE_URL}>
<img
className={classes.bannerImage}
src="/mgp.jpg"
alt="第四屆謠言惑眾獎投票中!"
src="/line-banner-mobile@2x.png"
alt={t`Add Cofacts as friend in LINE`}
style={{ marginBottom: 24 }}
/>
</a>
Expand Down
Binary file removed public/mgp.jpg
Binary file not shown.

0 comments on commit 098ec82

Please sign in to comment.