Improve performance teks page
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
import {getAlias} from '../../lib/utils/format'
|
||||
import {jwennTeks} from '../../lib/oki-api'
|
||||
import {jwennTeksEpiSlug} from '../../lib/oki-api'
|
||||
|
||||
import HeadLayout from '../../components/head-layout'
|
||||
import TeksDrawer from '../../components/teks/teks-drawer'
|
||||
@@ -62,8 +62,7 @@ export async function getServerSideProps({query}) {
|
||||
let errorMessage
|
||||
|
||||
try {
|
||||
paroles = await jwennTeks()
|
||||
parole = paroles.find(({attributes}) => attributes.slug === slug)
|
||||
parole = await jwennTeksEpiSlug(slug)
|
||||
} catch (error) {
|
||||
errorMessage = error
|
||||
hasError = true
|
||||
|
||||
Reference in New Issue
Block a user