generated from taylorbryant/gatsby-starter-tailwind
-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
viet nguyen
committed
Oct 25, 2023
1 parent
2b908aa
commit d6d20bf
Showing
7 changed files
with
93 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ArrowRightIcon } from '@heroicons/react/24/outline' | ||
|
||
import { getChangeHistoryServerSide } from '@/js/graphql/contribAPI' | ||
import { ChangesetRow } from '@/components/edit/RecentChangeHistory' | ||
import Link from 'next/link' | ||
|
||
export const RecentEdits: React.FC = async () => { | ||
const history = await getChangeHistoryServerSide() | ||
return ( | ||
<section className='px-4 2xl:px-0 w-full'> | ||
<div className='flex items-center justify-between'> | ||
<h2>Recent edits</h2> | ||
<Link href='/edit' className='text-sm hover:underline'>See more</Link> | ||
</div> | ||
<hr className='mb-6 border-2 border-base-content' /> | ||
<div className='mt-4 flex justify-center flex-row flex-wrap gap-y-10 gap-x-2'> | ||
{history.splice(0, 10).map(changetset => | ||
<ChangesetRow key={changetset.id} changeset={changetset} />)} | ||
</div> | ||
<div className='flex justify-center py-10'> | ||
<Link href='/edit' className='btn btn-sm btn-outline'>See more <ArrowRightIcon className='w-4 h-4' /></Link> | ||
</div> | ||
</section> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters