Skip to content

Commit

Permalink
feat: Add MigrationMessage component to PageLayout and HomePage
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu committed Jul 21, 2023
1 parent ea15cc1 commit 88e4bb3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Layout/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ErrorPresenter } from '../errors/ErrorPresenter';
import { Menu } from './SideBar/Meny';
import { canShowNavbar } from '../shared/canShowNavbar';
import NavigationBar from '../NavigationBar/NavigationBar';
import { MigrationMessage } from '../MigrationMessage';

interface LayoutProps {
error: unknown;
Expand All @@ -27,6 +28,7 @@ export function PageLayout({ error, children }: LayoutProps) {

return (
<>
<MigrationMessage />
<PageHeader>
<NavigationBar />
</PageHeader>
Expand Down
12 changes: 12 additions & 0 deletions src/components/MigrationMessage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import styled from 'styled-components';

const Background = styled.div`
background: rgb(229, 229, 229);
padding: 1rem;
border-bottom: 1px solid black;
`;
export function MigrationMessage() {
return <Background>
⚠️ Due to server migration you might experience some outage. Please try again later!
</Background>
}
2 changes: 2 additions & 0 deletions src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import HeroSection from './components/Sections/hero';
import NewsSection from './components/Sections/news/NewsSection';
import { HomeContainer } from '../../components/styled';
import NavigationBar from '../../components/NavigationBar/NavigationBar';
import { MigrationMessage } from '../../components/MigrationMessage';

export function HomePage() {
return (
<>
<MigrationMessage />
<NavigationBar />
<HomeContainer>
<HeroSection />
Expand Down

0 comments on commit 88e4bb3

Please sign in to comment.