Skip to content

Commit

Permalink
Merge pull request #436 from makerdao/feat/standardize-footer
Browse files Browse the repository at this point in the history
use new footer sitewide
  • Loading branch information
adamgoth authored Apr 27, 2022
2 parents b2c01ac + 419da18 commit e25ae31
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 281 deletions.
8 changes: 2 additions & 6 deletions modules/app/components/PageLoadingPlaceholder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ import SidebarLayout from 'modules/app/components/layout/layouts/Sidebar';

type Props = {
sidebar?: boolean;
shortenFooter?: boolean;
};

export default function PageLoadingPlaceholder({
sidebar = true,
shortenFooter = true
}: Props): React.ReactElement {
export default function PageLoadingPlaceholder({ sidebar = true }: Props): React.ReactElement {
return (
<PrimaryLayout sx={{ maxWidth: 'dashboard' }} shortenFooter={shortenFooter}>
<PrimaryLayout sx={{ maxWidth: 'dashboard' }}>
<Box mt={3} mb={4}>
<Skeleton width="50%" height={'70px'} />
</Box>
Expand Down
191 changes: 0 additions & 191 deletions modules/app/components/layout/Footer/LongFooter.tsx

This file was deleted.

47 changes: 0 additions & 47 deletions modules/app/components/layout/Footer/ShortFooter.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions modules/app/components/layout/Footer/index.tsx

This file was deleted.

7 changes: 2 additions & 5 deletions modules/app/components/layout/layouts/Primary.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { Box, Flex, ThemeUIStyleObject } from 'theme-ui';

import { fadeIn } from 'lib/keyframes';
import Footer from '../Footer';
import Footer from 'modules/home/components/Footer';

type Props = {
shortenFooter?: boolean;
fade?: boolean;
sx?: ThemeUIStyleObject;
};

const PrimaryLayout = ({
children,
shortenFooter = false,
fade = true,
...props
}: React.PropsWithChildren<Props>): React.ReactElement => {
Expand All @@ -29,7 +26,7 @@ const PrimaryLayout = ({
<Box as="main" sx={{ width: '100%', flex: '1 1 auto', variant: 'layout.main' }}>
{children}
</Box>
<Footer shorten={shortenFooter} />
<Footer />
</Flex>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ContactSection = ({ heading, logos, icon }) => {
);
};

export default function LandingFooter({ locale = 'en' }: { locale?: string }): React.ReactElement {
export default function Footer({ locale = 'en' }: { locale?: string }): React.ReactElement {
const bpi = useBreakpointIndex();
const [mode] = useColorMode();

Expand Down Expand Up @@ -82,10 +82,7 @@ export default function LandingFooter({ locale = 'en' }: { locale?: string }): R
url: 'https://makerdao.statuspage.io/',
title: t('Service Status')
},
{
url: 'https://oasis.app/',
title: t('Oasis')
},

{
url: 'https://auctions.makerdao.network/',
title: t('Auctions Dashboard')
Expand All @@ -101,6 +98,10 @@ export default function LandingFooter({ locale = 'en' }: { locale?: string }): R
{
url: 'https://daistats.com/',
title: t('DAI Stats')
},
{
url: 'https://vote.makerdao.com/terms',
title: t('Terms')
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion pages/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const AccountPage = (): React.ReactElement => {
const { create, tx, setTxId } = useDelegateCreate();

return (
<PrimaryLayout shortenFooter={true} sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<PrimaryLayout sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<HeadComponent title="Account" />

<SidebarLayout>
Expand Down
2 changes: 1 addition & 1 deletion pages/address/[address]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const AddressView = ({ addressInfo }: { addressInfo: AddressApiResponse }) => {
);

return (
<PrimaryLayout shortenFooter={true} sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<PrimaryLayout sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<HeadComponent
title={`${
addressInfo.isDelegate ? `${addressInfo.delegateInfo?.name} Delegate` : 'Address'
Expand Down
2 changes: 1 addition & 1 deletion pages/api-docs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ApiDoc = ({ spec }: InferGetStaticPropsType<typeof getStaticProps>): JSX.E
</InternalLink>
</Box>
) : (
<PrimaryLayout shortenFooter={true} sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<PrimaryLayout sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<HeadComponent title="Account" />
<SwaggerUI spec={spec} />
</PrimaryLayout>
Expand Down
2 changes: 1 addition & 1 deletion pages/delegates/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Delegates = ({ delegates, stats }: Props) => {
.sort(d => (isOwner(d) ? -1 : 0));

return (
<PrimaryLayout shortenFooter={true} sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<PrimaryLayout sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<HeadComponent
title="Delegates"
description="Vote delegation allows for MKR holders to delegate their voting power to delegates, which increases the effectiveness and efficiency of the governance process."
Expand Down
2 changes: 1 addition & 1 deletion pages/esmodule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const ESModule = (): React.ReactElement => {
};

return (
<PrimaryLayout shortenFooter={true} sx={{ maxWidth: 'container' }}>
<PrimaryLayout sx={{ maxWidth: 'container' }}>
<HeadComponent title="Emergency Shutdown Module" />

<DialogOverlay
Expand Down
2 changes: 1 addition & 1 deletion pages/executive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const ExecutiveOverview = ({ proposals }: { proposals?: Proposal[] }): JS
!voteDelegateContractAddress;

return (
<PrimaryLayout shortenFooter={true} sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<PrimaryLayout sx={{ maxWidth: [null, null, null, 'page', 'dashboard'] }}>
<HeadComponent title="Executive Proposals" />

{lockedMkrOldChief && lockedMkrOldChief.gt(0) && (
Expand Down
Loading

0 comments on commit e25ae31

Please sign in to comment.