gearheads
/
mastodon
Archived
2
0
Fork 0

Rewrite `logo.tsx` as FC (#24909)

gh/dev
たいち ひ 2023-05-10 15:58:21 +09:00 committed by GitHub
parent 6f8db56a01
commit 2d5e257938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -1,15 +1,13 @@
import React from 'react'; import React from 'react';
import logo from 'mastodon/../images/logo.svg'; import logo from 'mastodon/../images/logo.svg';
export const WordmarkLogo = () => ( export const WordmarkLogo: React.FC = () => (
<svg viewBox='0 0 261 66' className='logo logo--wordmark' role='img'> <svg viewBox='0 0 261 66' className='logo logo--wordmark' role='img'>
<title>Mastodon</title> <title>Mastodon</title>
<use xlinkHref='#logo-symbol-wordmark' /> <use xlinkHref='#logo-symbol-wordmark' />
</svg> </svg>
); );
export const SymbolLogo = () => ( export const SymbolLogo: React.FC = () => (
<img src={logo} alt='Mastodon' className='logo logo--icon' /> <img src={logo} alt='Mastodon' className='logo logo--icon' />
); );
export default WordmarkLogo;

View File

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import Logo from 'mastodon/components/logo'; import { WordmarkLogo } from 'mastodon/components/logo';
import { timelinePreview, showTrends } from 'mastodon/initial_state'; import { timelinePreview, showTrends } from 'mastodon/initial_state';
import ColumnLink from './column_link'; import ColumnLink from './column_link';
import DisabledAccountBanner from './disabled_account_banner'; import DisabledAccountBanner from './disabled_account_banner';
@ -46,7 +46,7 @@ class NavigationPanel extends React.Component {
return ( return (
<div className='navigation-panel'> <div className='navigation-panel'>
<div className='navigation-panel__logo'> <div className='navigation-panel__logo'>
<Link to='/' className='column-link column-link--logo'><Logo /></Link> <Link to='/' className='column-link column-link--logo'><WordmarkLogo /></Link>
<hr /> <hr />
</div> </div>