style: format
This commit is contained in:
parent
43304eefac
commit
8debd365d3
2 changed files with 7 additions and 11 deletions
|
@ -100,7 +100,7 @@ const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => {
|
|||
<span className='font-bold'>DOI: </span>
|
||||
{doi}
|
||||
</p>
|
||||
)}
|
||||
)}
|
||||
<Suspense
|
||||
fallback={
|
||||
<div className='max-w-sm animate-pulse flex flex-wrap gap-2'>
|
||||
|
|
|
@ -2,9 +2,5 @@ import crypto from 'crypto'
|
|||
|
||||
export default function hash(key: string) {
|
||||
// git style hash
|
||||
return crypto
|
||||
.createHash('sha256')
|
||||
.update(key)
|
||||
.digest('hex')
|
||||
.substring(0, 7)
|
||||
return crypto.createHash('sha256').update(key).digest('hex').substring(0, 7)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue