pages Page to Index
This commit is contained in:
1 parent
c1a3af3a3e
commit
a13b642979
4 files changed
+8
-8
No files matched your search
+2
-2
@@ -5,7 +5,7 @@ import { Copyright } from 'src/components/Copyright'
|
||||
import { Block } from 'src/components/Block'
|
||||
import { Spacer } from 'src/components/Spacer'
|
||||
|
||||
const Page: NextPage = () => (
|
||||
const Index: NextPage = () => (
|
||||
<Wrapper
|
||||
header={null}
|
||||
footer={(
|
||||
@@ -23,4 +23,4 @@ const Page: NextPage = () => (
|
||||
</Wrapper>
|
||||
)
|
||||
|
||||
export default Page
|
||||
export default Index
|
||||
@@ -43,7 +43,7 @@ type Props = {
|
||||
data: CardData[]
|
||||
}
|
||||
|
||||
const Page: NextPage<Props> = props => {
|
||||
const Index: NextPage<Props> = props => {
|
||||
if (!props.data) {
|
||||
console.log('kek error')
|
||||
return
|
||||
@@ -131,4 +131,4 @@ export const getStaticProps = async (ctx: NextPageContext) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default Page
|
||||
export default Index
|
||||
@@ -13,7 +13,7 @@ type Props = {
|
||||
meta: IMeta
|
||||
}
|
||||
|
||||
const Page: NextPage<Props> = props => {
|
||||
const Index: NextPage<Props> = props => {
|
||||
if (!props.data) {
|
||||
console.log('kek error', props)
|
||||
|
||||
@@ -71,4 +71,4 @@ export const getStaticPaths = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
export default Page
|
||||
export default Index
|
||||
+2
-2
@@ -8,13 +8,13 @@ import { getPagesCardsByTags } from 'src/rest'
|
||||
import { NextPage } from 'next'
|
||||
import { IMeta, PageCardData, PageCardDto } from 'src/types'
|
||||
|
||||
interface IProps {
|
||||
type Props = {
|
||||
title: string
|
||||
meta: IMeta
|
||||
items: PageCardDto[]
|
||||
}
|
||||
|
||||
const Index: NextPage<IProps> = props => {
|
||||
const Index: NextPage<Props> = props => {
|
||||
const items = props.items.map<PageCardData>(item => ({
|
||||
url: item.url,
|
||||
title: item.title,
|
||||
|
||||
Reference in new issue
Block a user