hunk.code_window: import { defaultConfigOptions } from './web-preset'
   import { IS_SERVER } from './env'
   import { UNDEFINED, mergeObjects } from './helper'
   import { internalMutate } from './mutate'
   import { SWRGlobalState } from './global-state'
   import * as revalidateEvents from '../constants/revalidate-events'
  
hunk.labels: keep keep replace keep keep keep
hunk.after_edit: import { UNDEFINED, mergeObjects, noop } from './helper'
  
hunk.file_path: src/utils/cache.ts
hunk.type: replace
file: import React from 'react'
  import Link from 'next/link'
  import fetch from '../libs/fetch'
  
  import useSWR from 'swr'
  
  export default function HomePage() {
    const { data } = useSWR<string[]>('/api/data', fetch)
  
    return (
      <div style={{ textAlign: 'center' }}>
        <h1>Trending Projects</h1>
        <div>
          {data
            ? data.map(project => (
                <p key={project}>
                  <Link href="/[user]/[repo]" as={`/${project}`}>
                    <a>{project}</a>
                  </Link>
                </p>
              ))
            : 'loading...'}
        </div>
      </div>
    )
  }
  