import React from 'react'; import { fetchJson } from '@/app/fetch'; import { Card, CardBody } from '@nextui-org/react'; import Image from 'next/image'; import Link from 'next/link'; export default async function Friends() { let list = await fetchJson('https://raw.githubusercontent.com/Lumither/friends/master/friends.json'); const listLength = list.length; const listMaxIdx = listLength - 1; const listIsOdd = listLength % 2 !== 0; return (

海内存知己

天涯若比邻

{ 'Though far apart, kin at heart' }

    { list.map((friend: any, key: number) => (
  • avatar avatar

    { friend['title'] }

    { (friend['name'] === undefined || friend['name'].isNull) ??

    { `@ ${ friend['name'] }` }

    } { (friend['desc'] === undefined || friend['desc'].isNull) ??

    { friend['desc'] }

    }
  • )) }

想要成为好伙伴嘛,向这里发起PR吧

); }