mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-06-04 15:11:08 +00:00
chore: prettier-plugin-sort-imports
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import * as React from 'react'
|
||||
import { GetStaticProps } from 'next'
|
||||
import { isDev, domain } from 'lib/config'
|
||||
|
||||
import { NotionPage } from 'components'
|
||||
|
||||
import { domain, isDev } from 'lib/config'
|
||||
import { getSiteMap } from 'lib/get-site-map'
|
||||
import { resolveNotionPage } from 'lib/resolve-notion-page'
|
||||
import { PageProps, Params } from 'lib/types'
|
||||
import { NotionPage } from 'components'
|
||||
|
||||
export const getStaticProps: GetStaticProps<PageProps, Params> = async (
|
||||
context
|
||||
|
||||
@@ -1,38 +1,32 @@
|
||||
// global styles shared across the entire site
|
||||
import 'styles/global.css'
|
||||
import * as React from 'react'
|
||||
import type { AppProps } from 'next/app'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
import * as Fathom from 'fathom-client'
|
||||
// used for rendering equations (optional)
|
||||
import 'katex/dist/katex.min.css'
|
||||
import posthog from 'posthog-js'
|
||||
// used for code syntax highlighting (optional)
|
||||
import 'prismjs/themes/prism-coy.css'
|
||||
// core styles shared by all of react-notion-x (required)
|
||||
import 'react-notion-x/src/styles.css'
|
||||
|
||||
// used for rendering equations (optional)
|
||||
import 'katex/dist/katex.min.css'
|
||||
|
||||
// used for code syntax highlighting (optional)
|
||||
import 'prismjs/themes/prism-coy.css'
|
||||
|
||||
// this might be better for dark mode
|
||||
// import 'prismjs/themes/prism-okaidia.css'
|
||||
|
||||
// global style overrides for notion
|
||||
import 'styles/notion.css'
|
||||
|
||||
// global style overrides for prism theme (optional)
|
||||
import 'styles/prism-theme.css'
|
||||
|
||||
import * as React from 'react'
|
||||
import * as Fathom from 'fathom-client'
|
||||
import type { AppProps } from 'next/app'
|
||||
import { useRouter } from 'next/router'
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
import { bootstrap } from 'lib/bootstrap-client'
|
||||
import {
|
||||
isServer,
|
||||
fathomId,
|
||||
fathomConfig,
|
||||
posthogId,
|
||||
posthogConfig
|
||||
fathomId,
|
||||
isServer,
|
||||
posthogConfig,
|
||||
posthogId
|
||||
} from 'lib/config'
|
||||
import 'styles/global.css'
|
||||
// this might be better for dark mode
|
||||
// import 'prismjs/themes/prism-okaidia.css'
|
||||
// global style overrides for notion
|
||||
import 'styles/notion.css'
|
||||
// global style overrides for prism theme (optional)
|
||||
import 'styles/prism-theme.css'
|
||||
|
||||
if (!isServer) {
|
||||
bootstrap()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import * as React from 'react'
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||
import Document, { Head, Html, Main, NextScript } from 'next/document'
|
||||
|
||||
import { IconContext } from '@react-icons/all-files'
|
||||
|
||||
export default class MyDocument extends Document {
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
import { PageBlock } from 'notion-types'
|
||||
import {
|
||||
getBlockTitle,
|
||||
getBlockIcon,
|
||||
getBlockTitle,
|
||||
getPageProperty,
|
||||
isUrl,
|
||||
parsePageId
|
||||
} from 'notion-utils'
|
||||
import { PageBlock } from 'notion-types'
|
||||
|
||||
import { notion } from 'lib/notion-api'
|
||||
import { mapImageUrl } from 'lib/map-image-url'
|
||||
import { NotionPageInfo } from 'lib/types'
|
||||
import * as libConfig from 'lib/config'
|
||||
import { mapImageUrl } from 'lib/map-image-url'
|
||||
import { notion } from 'lib/notion-api'
|
||||
import { NotionPageInfo } from 'lib/types'
|
||||
|
||||
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
if (req.method !== 'POST') {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import * as React from 'react'
|
||||
import { ImageResponse } from '@vercel/og'
|
||||
import { NextRequest } from 'next/server'
|
||||
|
||||
import { ImageResponse } from '@vercel/og'
|
||||
|
||||
import { api, apiHost } from 'lib/config'
|
||||
import { NotionPageInfo } from 'lib/types'
|
||||
import { apiHost, api } from 'lib/config'
|
||||
|
||||
const interRegularFontP = fetch(
|
||||
new URL('../../public/fonts/Inter-Regular.ttf', import.meta.url)
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import RSS from 'rss'
|
||||
import type { GetServerSideProps } from 'next'
|
||||
|
||||
import { ExtendedRecordMap } from 'notion-types'
|
||||
import {
|
||||
getBlockParentPage,
|
||||
getBlockTitle,
|
||||
getPageProperty,
|
||||
idToUuid
|
||||
} from 'notion-utils'
|
||||
import { ExtendedRecordMap } from 'notion-types'
|
||||
import RSS from 'rss'
|
||||
|
||||
import * as config from 'lib/config'
|
||||
import { getSiteMap } from 'lib/get-site-map'
|
||||
import { getCanonicalPageUrl } from 'lib/map-page-url'
|
||||
import { getSocialImageUrl } from 'lib/get-social-image-url'
|
||||
import { getCanonicalPageUrl } from 'lib/map-page-url'
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
|
||||
if (req.method !== 'GET') {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import * as React from 'react'
|
||||
|
||||
import { NotionPage } from 'components'
|
||||
|
||||
import { domain } from 'lib/config'
|
||||
import { resolveNotionPage } from 'lib/resolve-notion-page'
|
||||
import { NotionPage } from 'components'
|
||||
|
||||
export const getStaticProps = async () => {
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { GetServerSideProps } from 'next'
|
||||
|
||||
import { host } from 'lib/config'
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { GetServerSideProps } from 'next'
|
||||
import type { SiteMap } from 'lib/types'
|
||||
|
||||
import { host } from 'lib/config'
|
||||
import { getSiteMap } from 'lib/get-site-map'
|
||||
import type { SiteMap } from 'lib/types'
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
|
||||
if (req.method !== 'GET') {
|
||||
|
||||
Reference in New Issue
Block a user