File tree Expand file tree Collapse file tree 4 files changed +40
-3
lines changed
Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 Button ,
1313} from 'reactstrap'
1414import { connect } from 'react-redux'
15+ import moment from 'moment'
1516
1617import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
1718import { faUser } from '@fortawesome/free-solid-svg-icons'
@@ -52,12 +53,23 @@ class Header extends React.Component {
5253 // on the login page. If that's the case, disable the link to the homepage
5354 // so they can't cycle repeatedly back and forth between that and the
5455 // login page
56+ let brandText
57+ if ( moment ( ) . isAfter ( '2019-04-02T00:00:00-0500' ) ) {
58+ brandText = 'Queue@Illinois'
59+ } else {
60+ brandText = (
61+ < >
62+ < span style = { { textDecoration : 'line-through' } } > Queue</ span >
63+ Stack@Illinois
64+ </ >
65+ )
66+ }
5567 const brandLink = user ? (
5668 < Link route = "index" passHref >
57- < NavbarBrand > Queue@Illinois </ NavbarBrand >
69+ < NavbarBrand > { brandText } </ NavbarBrand >
5870 </ Link >
5971 ) : (
60- < NavbarBrand tag = "span" > Queue@Illinois </ NavbarBrand >
72+ < NavbarBrand tag = "span" > { brandText } </ NavbarBrand >
6173 )
6274
6375 return (
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { Alert } from 'reactstrap'
3+ import moment from 'moment'
4+
5+ const StackRebrandingAlert = ( ) => {
6+ // Hide alert after April Fool's day
7+ if ( moment ( ) . isAfter ( '2019-04-02 00:00:00.000-05' ) ) return null
8+
9+ return (
10+ < Alert color = "primary" fade = { false } >
11+ < span className = "mr-3" > We're rebranding to Stack@Illinois!</ span >
12+ < strong >
13+ < a href = "https://queue.illinois.edu/blog/stack" >
14+ Read more →
15+ </ a >
16+ </ strong >
17+ </ Alert >
18+ )
19+ }
20+
21+ export default StackRebrandingAlert
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import React from 'react'
33import Document , { Head , Main , NextScript } from 'next/document'
44import flush from 'styled-jsx/server'
55import { dom } from '@fortawesome/fontawesome-svg-core'
6+ import moment from 'moment'
67
78import { baseUrl , isDev , isNow } from '../util'
89
@@ -27,6 +28,7 @@ export default class MyDocument extends Document {
2728 }
2829 const faviconPath = `${ baseUrl } /static/favicon.ico`
2930 const manifestPath = `${ baseUrl } /static/manifest.json`
31+ const isAprilFools = moment ( ) . isBefore ( '2019-04-02 00:00:00.000-05' )
3032 return (
3133 < html lang = "en" >
3234 < Head >
@@ -46,7 +48,7 @@ export default class MyDocument extends Document {
4648 crossOrigin = "use-credentials"
4749 href = { manifestPath }
4850 />
49- < title > Queue@Illinois</ title >
51+ < title > { isAprilFools ? 'Stack@Illinois' : ' Queue@Illinois' } </ title >
5052 < style > { dom . css ( ) } </ style >
5153 < link rel = "icon" href = { faviconPath } type = "image/png" />
5254 < script dangerouslySetInnerHTML = { script } />
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import NewQueue from '../components/NewQueue'
2020import ShowForAdmin from '../components/ShowForAdmin'
2121import DevWorkshopAd from '../components/DevWorkshopAd'
2222import QueueCardListContainer from '../containers/QueueCardListContainer'
23+ import StackRebrandingAlert from '../components/StackRebrandingAlert'
2324
2425class Index extends React . Component {
2526 static async getInitialProps ( { store, isServer } ) {
@@ -113,6 +114,7 @@ class Index extends React.Component {
113114 < Fragment >
114115 < Container >
115116 < DevWorkshopAd />
117+ < StackRebrandingAlert />
116118 < div className = "d-flex flex-wrap align-items-center mb-4" >
117119 < h1 className = "display-4 d-inline-block mb-0 mt-3 mr-auto pr-3" >
118120 Open queues
You can’t perform that action at this time.
0 commit comments