Share component refactoring
This commit is contained in:
1 parent
473c4047be
commit
17ca9123f5
5 files changed
+6
-16
No files matched your search
@@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import { App } from '../../src/components/App'
|
import { App } from '../../src/components/App'
|
||||||
import Document from '../../src/components/Document'
|
import Document from '../../src/components/Document'
|
||||||
import Share from '../../src/components/Share'
|
import { Share } from '../../src/components/Share'
|
||||||
import menuModel from '../../src/models/menu'
|
import menuModel from '../../src/models/menu'
|
||||||
import { buildMenu } from '../../src/lib/menu'
|
import { buildMenu } from '../../src/lib/menu'
|
||||||
import { meta } from '../../src/lib/meta'
|
import { meta } from '../../src/lib/meta'
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import { App } from '../src/components/App'
|
import { App } from '../src/components/App'
|
||||||
import { Schedule } from '../src/components/Schedule'
|
import { Schedule } from '../src/components/Schedule'
|
||||||
import Share from '../src/components/Share'
|
import { Share } from '../src/components/Share'
|
||||||
import menuModel from '../src/models/menu'
|
import menuModel from '../src/models/menu'
|
||||||
import { buildMenu } from '../src/lib/menu'
|
import { buildMenu } from '../src/lib/menu'
|
||||||
import { createApiUrl, requestGet, wrapInitialProps } from '../src/next-lib'
|
import { createApiUrl, requestGet, wrapInitialProps } from '../src/next-lib'
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { dateFormat } from '../lib/date'
|
import { dateFormat } from '../lib/date'
|
||||||
|
import { Share } from './Share'
|
||||||
|
|
||||||
const Tag = ({ children }) => (
|
const Tag = ({ children }) => (
|
||||||
<li className="ArticleTags-Item">
|
<li className="ArticleTags-Item">
|
||||||
@@ -29,15 +30,6 @@ const Head = ({ date, tags = [], children }) => (
|
|||||||
</header>
|
</header>
|
||||||
)
|
)
|
||||||
|
|
||||||
const Share = () => (
|
|
||||||
<div className="likely">
|
|
||||||
<div className="vkontakte">Поделиться</div>
|
|
||||||
<div className="facebook">Поделиться</div>
|
|
||||||
<div className="telegram">Отправить</div>
|
|
||||||
<div className="twitter">Твитнуть</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
|
|
||||||
const Article = ({ children, date, tags, title, shareable }) => (
|
const Article = ({ children, date, tags, title, shareable }) => (
|
||||||
<article className="Article">
|
<article className="Article">
|
||||||
<Head
|
<Head
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import Share from '../Share'
|
import { Share } from '../Share'
|
||||||
import Html from '../Html'
|
import Html from '../Html'
|
||||||
|
|
||||||
export interface IPageProps {
|
export interface IPageProps {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const React = require('react')
|
import * as React from 'react'
|
||||||
|
|
||||||
const Share = () => (
|
export const Share: React.FC = () => (
|
||||||
<div className="likely">
|
<div className="likely">
|
||||||
<div className="vkontakte">Поделиться</div>
|
<div className="vkontakte">Поделиться</div>
|
||||||
<div className="facebook">Поделиться</div>
|
<div className="facebook">Поделиться</div>
|
||||||
@@ -8,5 +8,3 @@ const Share = () => (
|
|||||||
<div className="twitter">Твитнуть</div>
|
<div className="twitter">Твитнуть</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
module.exports = Share
|
|
||||||
Reference in new issue
Block a user