Html component update

This commit is contained in:
tmshv committed 2020-02-15 06:40:47 +03:00
1 parent f874de73b9
commit 6a86de6c84
6 files changed
+12 -11

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
import Head from 'next/head'
import { App } from 'src/components/App'
import Article from 'src/components/Article'
import Html from 'src/components/Html'
import { Html } from 'src/components/Html'
import menuModel from 'src/models/menu'
import { buildMenu } from 'src/lib/menu'
import { createApiUrl, requestGet, IResponseItems } from 'src/next-lib'
+1 -1
View File
@@ -2,7 +2,7 @@ import Head from 'next/head'
import { get } from 'lodash'
import { App } from 'src/components/App'
import Article from 'src/components/Article'
import Html from 'src/components/Html'
import { Html } from 'src/components/Html'
import menuModel from 'src/models/menu'
import { buildMenu } from 'src/lib/menu'
import { Meta } from 'src/components/Meta'
+1 -1
View File
@@ -8,7 +8,7 @@ import { meta } from 'src/lib/meta'
import { createApiUrl, requestGet, IResponseItems } from 'src/next-lib'
import { NextPage, NextPageContext } from 'next'
import { IMeta } from 'src/types'
import Html from 'src/components/Html'
import { Html } from 'src/components/Html'
interface IProps {
pageUrl: string
-7
View File
@@ -1,7 +0,0 @@
import React from 'react'
export default function Html(props) {
return (
<div dangerouslySetInnerHTML={{ __html: props.html }} />
)
}
+7
View File
@@ -0,0 +1,7 @@
export type HtmlProps = {
html: string
}
export const Html: React.FC<HtmlProps> = props => (
<div dangerouslySetInnerHTML={{ __html: props.html }} />
)
+2 -1
View File
@@ -1,9 +1,10 @@
import * as React from 'react'
import { Share } from '../Share'
import Html from '../Html'
import { Html } from '../Html'
export interface IPageProps {
showSocialShare: boolean
children: string
}
export const Page: React.FC<IPageProps> = props => (