From f23bca0a75b09180034a0b2d22c4966d53398c0a Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 20 Mar 2020 17:40:55 +0100 Subject: [PATCH] Consistent naming --- docs/src/pages/landing/Pro.js | 6 ++-- docs/src/pages/landing/QuickWord.js | 6 ++-- docs/src/pages/landing/Quotes.js | 16 +++++----- docs/src/pages/landing/Sponsors.js | 6 ++-- docs/src/pages/landing/Steps.js | 2 +- docs/src/pages/landing/Themes.js | 47 +++++++++++++++-------------- docs/src/pages/landing/Users.js | 6 ++-- 7 files changed, 40 insertions(+), 49 deletions(-) diff --git a/docs/src/pages/landing/Pro.js b/docs/src/pages/landing/Pro.js index 8f4aec35bc28ee..709c37f94b40f0 100644 --- a/docs/src/pages/landing/Pro.js +++ b/docs/src/pages/landing/Pro.js @@ -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); @@ -41,5 +41,3 @@ function HomePro() { ); } - -export default HomePro; diff --git a/docs/src/pages/landing/QuickWord.js b/docs/src/pages/landing/QuickWord.js index 27ed5f36c1448e..ed50fbd335ee21 100644 --- a/docs/src/pages/landing/QuickWord.js +++ b/docs/src/pages/landing/QuickWord.js @@ -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())]; @@ -60,5 +60,3 @@ function HomeQuickWord() { ); } - -export default HomeQuickWord; diff --git a/docs/src/pages/landing/Quotes.js b/docs/src/pages/landing/Quotes.js index af1a55c2da67f8..3d36e45fe110d7 100644 --- a/docs/src/pages/landing/Quotes.js +++ b/docs/src/pages/landing/Quotes.js @@ -89,7 +89,7 @@ const useStyles = makeStyles( margin: theme.spacing(2, 0, 0), }, }), - { name: 'HomeQuotes' }, + { name: 'Quotes' }, ); const useQuoteStyles = makeStyles( @@ -121,7 +121,7 @@ const useQuoteStyles = makeStyles( { name: 'HomeQuote' }, ); -const HomeQuoteLink = React.forwardRef((props, ref) => { +const QuoteLink = React.forwardRef((props, ref) => { return ( { ); }); -function HomeQuote(props) { +function Quote(props) { const { avatar, href, name, quote, userName } = props; const classes = useQuoteStyles(); return ( - + @@ -171,7 +171,7 @@ function HomeQuote(props) { ); } -HomeQuote.propTypes = { +Quote.propTypes = { avatar: PropTypes.string, href: PropTypes.string, name: PropTypes.string, @@ -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); @@ -204,7 +204,7 @@ function HomeQuotes() { {selectedQuotes.map(quote => ( - ); } - -export default HomeQuotes; diff --git a/docs/src/pages/landing/Sponsors.js b/docs/src/pages/landing/Sponsors.js index 8f43af0821598d..8646e066b11f12 100644 --- a/docs/src/pages/landing/Sponsors.js +++ b/docs/src/pages/landing/Sponsors.js @@ -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); @@ -45,5 +45,3 @@ function HomeSponsors() { ); } - -export default HomeSponsors; diff --git a/docs/src/pages/landing/Steps.js b/docs/src/pages/landing/Steps.js index 924595aa93a7ef..e7ad87d851e7a4 100644 --- a/docs/src/pages/landing/Steps.js +++ b/docs/src/pages/landing/Steps.js @@ -79,7 +79,7 @@ const useStyles = makeStyles( height: 'auto', }, }), - { name: 'HomeSteps' }, + { name: 'Steps' }, ); function HomeSteps() { diff --git a/docs/src/pages/landing/Themes.js b/docs/src/pages/landing/Themes.js index 1469d575fc8ca1..e8592658c24d00 100644 --- a/docs/src/pages/landing/Themes.js +++ b/docs/src/pages/landing/Themes.js @@ -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 ( @@ -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(); @@ -87,5 +90,3 @@ function HomeThemes() { ); } - -export default HomeThemes; diff --git a/docs/src/pages/landing/Users.js b/docs/src/pages/landing/Users.js index ea6bc272b3f2db..a17ad2988a8485 100644 --- a/docs/src/pages/landing/Users.js +++ b/docs/src/pages/landing/Users.js @@ -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); @@ -170,5 +170,3 @@ function HomeUsers() { ); } - -export default HomeUsers;