Skip to content

Commit

Permalink
Move Copyright into its own component
Browse files Browse the repository at this point in the history
  • Loading branch information
HaNdTriX committed Apr 2, 2020
1 parent 549bc5c commit be638dd
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 52 deletions.
14 changes: 1 addition & 13 deletions examples/nextjs-with-typescript/pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,7 @@ import Box from '@material-ui/core/Box';
import MuiLink from '@material-ui/core/Link';
import ProTip from '../src/ProTip';
import Link from '../src/Link';

function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
<MuiLink color="inherit" href="https://material-ui.com/">
Your Website
</MuiLink>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
);
}
import Copyright from '../src/Copyright';

export default function About() {
return (
Expand Down
14 changes: 1 addition & 13 deletions examples/nextjs-with-typescript/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,7 @@ import Box from '@material-ui/core/Box';
import MuiLink from '@material-ui/core/Link';
import ProTip from '../src/ProTip';
import Link from '../src/Link';

function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
<MuiLink color="inherit" href="https://material-ui.com/">
Your Website
</MuiLink>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
);
}
import Copyright from '../src/Copyright';

export default function Index() {
return (
Expand Down
16 changes: 16 additions & 0 deletions examples/nextjs-with-typescript/src/Copyright.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'
import Typography from '@material-ui/core/Typography';
import MuiLink from '@material-ui/core/Link';

export default function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
<MuiLink color="inherit" href="https://material-ui.com/">
Your Website
</MuiLink>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
);
}
14 changes: 1 addition & 13 deletions examples/nextjs/pages/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,7 @@ import MuiLink from '@material-ui/core/Link';
import Button from '@material-ui/core/Button';
import ProTip from '../src/ProTip';
import Link from '../src/Link';

function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
<MuiLink color="inherit" href="https://material-ui.com/">
Your Website
</MuiLink>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
);
}
import Copyright from '../src/Copyright';

export default function About() {
return (
Expand Down
14 changes: 1 addition & 13 deletions examples/nextjs/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,7 @@ import Box from '@material-ui/core/Box';
import MuiLink from '@material-ui/core/Link';
import ProTip from '../src/ProTip';
import Link from '../src/Link';

function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
<MuiLink color="inherit" href="https://material-ui.com/">
Your Website
</MuiLink>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
);
}
import Copyright from '../src/Copyright';

export default function Index() {
return (
Expand Down
16 changes: 16 additions & 0 deletions examples/nextjs/src/Copyright.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import Typography from '@material-ui/core/Typography';
import MuiLink from '@material-ui/core/Link';

export default function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
<MuiLink color="inherit" href="https://material-ui.com/">
Your Website
</MuiLink>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
);
}

0 comments on commit be638dd

Please sign in to comment.