Skip to content

Commit

Permalink
Consistent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 20, 2020
1 parent d5b8276 commit f23bca0
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 49 deletions.
6 changes: 2 additions & 4 deletions docs/src/pages/landing/Pro.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ const useStyles = makeStyles(
},
},
}),
{ name: 'HomePro' },
{ name: 'Pro' },
);

function HomePro() {
export default function Pro() {
const classes = useStyles();
const t = useSelector(state => state.options.t);

Expand All @@ -41,5 +41,3 @@ function HomePro() {
</Link>
);
}

export default HomePro;
6 changes: 2 additions & 4 deletions docs/src/pages/landing/QuickWord.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ const useStyles = makeStyles(
paddingBottom: theme.spacing(2),
},
}),
{ name: 'HomeQuickWord' },
{ name: 'QuickWord' },
);

function HomeQuickWord() {
export default function QuickWord() {
const classes = useStyles();
const t = useSelector(state => state.options.t);
const backer = backers[Math.floor(backers.length * Math.random())];
Expand All @@ -60,5 +60,3 @@ function HomeQuickWord() {
</div>
);
}

export default HomeQuickWord;
16 changes: 7 additions & 9 deletions docs/src/pages/landing/Quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const useStyles = makeStyles(
margin: theme.spacing(2, 0, 0),
},
}),
{ name: 'HomeQuotes' },
{ name: 'Quotes' },
);

const useQuoteStyles = makeStyles(
Expand Down Expand Up @@ -121,7 +121,7 @@ const useQuoteStyles = makeStyles(
{ name: 'HomeQuote' },
);

const HomeQuoteLink = React.forwardRef((props, ref) => {
const QuoteLink = React.forwardRef((props, ref) => {
return (
<Link
data-ga-event-category="quote"
Expand All @@ -136,13 +136,13 @@ const HomeQuoteLink = React.forwardRef((props, ref) => {
);
});

function HomeQuote(props) {
function Quote(props) {
const { avatar, href, name, quote, userName } = props;
const classes = useQuoteStyles();

return (
<Card variant="outlined" className={classes.card}>
<CardActionArea component={HomeQuoteLink} href={href} className={classes.cardAction}>
<CardActionArea component={QuoteLink} href={href} className={classes.cardAction}>
<CardContent>
<Grid container spacing={3}>
<Grid item>
Expand Down Expand Up @@ -171,7 +171,7 @@ function HomeQuote(props) {
);
}

HomeQuote.propTypes = {
Quote.propTypes = {
avatar: PropTypes.string,
href: PropTypes.string,
name: PropTypes.string,
Expand All @@ -185,7 +185,7 @@ for (let i = 0; i < 3; i += 1) {
selectedQuotes.push(quotes[(startIndex + i) % quotes.length]);
}

function HomeQuotes() {
export default function Quotes() {
const classes = useStyles();
const t = useSelector(state => state.options.t);

Expand All @@ -204,7 +204,7 @@ function HomeQuotes() {
<Grid container spacing={2} className={classes.grid}>
{selectedQuotes.map(quote => (
<Grid item xs={12} md={4} key={quote.username}>
<HomeQuote
<Quote
avatar={quote.avatar}
href={quote.tweet}
name={quote.name}
Expand All @@ -220,5 +220,3 @@ function HomeQuotes() {
</div>
);
}

export default HomeQuotes;
6 changes: 2 additions & 4 deletions docs/src/pages/landing/Sponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ const useStyles = makeStyles(
padding: theme.spacing(4, 0),
},
}),
{ name: 'HomeSponsors' },
{ name: 'Sponsors' },
);

function HomeSponsors() {
export default function Sponsors() {
const classes = useStyles();
const userLanguage = useSelector(state => state.options.userLanguage);

Expand All @@ -45,5 +45,3 @@ function HomeSponsors() {
</div>
);
}

export default HomeSponsors;
2 changes: 1 addition & 1 deletion docs/src/pages/landing/Steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const useStyles = makeStyles(
height: 'auto',
},
}),
{ name: 'HomeSteps' },
{ name: 'Steps' },
);

function HomeSteps() {
Expand Down
47 changes: 24 additions & 23 deletions docs/src/pages/landing/Themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,30 @@ import Button from '@material-ui/core/Button';
import NoSsr from '@material-ui/core/NoSsr';
import Link from 'docs/src/modules/components/Link';

const useStyles = makeStyles(theme => ({
root: {
padding: theme.spacing(2),
minHeight: 160,
marginTop: theme.spacing(8),
},
const useStyles = makeStyles(
theme => ({
root: {
padding: theme.spacing(2),
minHeight: 160,
marginTop: theme.spacing(8),
},

link: {
marginTop: theme.spacing(1),
display: 'block',
},
img: {
maxWidth: 960,
width: '100%',
height: 'auto',
marginTop: theme.spacing(4),
},
button: {
margin: theme.spacing(4, 0, 6),
},
}));
link: {
marginTop: theme.spacing(1),
display: 'block',
},
img: {
maxWidth: 960,
width: '100%',
height: 'auto',
marginTop: theme.spacing(4),
},
button: {
margin: theme.spacing(4, 0, 6),
},
}),
{ name: 'Themes' },
);

const PremiumThemesLink = React.forwardRef((props, ref) => {
return (
Expand All @@ -44,7 +47,7 @@ const PremiumThemesLink = React.forwardRef((props, ref) => {
);
});

function HomeThemes() {
export default function Themes() {
const classes = useStyles();
const t = useSelector(state => state.options.t);
const theme = useTheme();
Expand Down Expand Up @@ -87,5 +90,3 @@ function HomeThemes() {
</div>
);
}

export default HomeThemes;
6 changes: 2 additions & 4 deletions docs/src/pages/landing/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ const useStyles = makeStyles(
margin: theme.spacing(2, 0, 0),
},
}),
{ name: 'HomeUsers' },
{ name: 'Users' },
);

function HomeUsers() {
export default function Users() {
const classes = useStyles();
const t = useSelector(state => state.options.t);

Expand Down Expand Up @@ -170,5 +170,3 @@ function HomeUsers() {
</div>
);
}

export default HomeUsers;

0 comments on commit f23bca0

Please sign in to comment.