refactor: remove useless config for absolute paths and improve components exports

This commit is contained in:
2022-04-12 14:47:21 +00:00
parent f46690690c
commit 9d672e3cf3
4 changed files with 6 additions and 15 deletions

View File

@ -1,9 +1,9 @@
// eslint-disable-next-line @next/next/no-document-import-in-page
import { Head } from 'next/document'
import { projectConfig } from '@/utils/config'
import { projectConfig } from 'utils/config'
const CommonHead = (): JSX.Element => {
export const CommonHead = (): JSX.Element => {
return (
<Head>
{/* Link Tags */}
@ -62,5 +62,3 @@ const CommonHead = (): JSX.Element => {
</Head>
)
}
export default CommonHead

View File

@ -1,6 +1,6 @@
import Head from 'next/head'
import { projectConfig } from '@/utils/config'
import { projectConfig } from 'utils/config'
interface HeadProps {
longName?: string
@ -10,8 +10,7 @@ interface HeadProps {
const NextHead: React.FC<HeadProps> = (props) => {
const {
longName = projectConfig.longName,
shortName = projectConfig.shortName,
children
shortName = projectConfig.shortName
} = props
return (
@ -23,8 +22,6 @@ const NextHead: React.FC<HeadProps> = (props) => {
</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
{children}
</Head>
)
}