style: format

This commit is contained in:
Team1280Programming 2024-02-15 23:12:04 +00:00 committed by github-actions[bot]
parent 43304eefac
commit 8debd365d3
2 changed files with 7 additions and 11 deletions

View file

@ -96,11 +96,11 @@ const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => {
{citation ? <>{citation}</> : <>eeXiv:{hash}</>}
</p>
{doi && (
<p className='my-2'>
<span className='font-bold'>DOI: </span>
{doi}
</p>
)}
<p className='my-2'>
<span className='font-bold'>DOI: </span>
{doi}
</p>
)}
<Suspense
fallback={
<div className='max-w-sm animate-pulse flex flex-wrap gap-2'>

View file

@ -1,10 +1,6 @@
import crypto from 'crypto'
export default function hash(key: string) {
// git style hash
return crypto
.createHash('sha256')
.update(key)
.digest('hex')
.substring(0, 7)
// git style hash
return crypto.createHash('sha256').update(key).digest('hex').substring(0, 7)
}