From 8debd365d3c22d753339b550a136814dc100860f Mon Sep 17 00:00:00 2001
From: Team1280Programming
Date: Thu, 15 Feb 2024 23:12:04 +0000
Subject: [PATCH] style: format
---
src/app/document/view/[slug]/DocumentViewer.tsx | 10 +++++-----
src/app/utils/hash.ts | 8 ++------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/app/document/view/[slug]/DocumentViewer.tsx b/src/app/document/view/[slug]/DocumentViewer.tsx
index be9dd41..a092b36 100644
--- a/src/app/document/view/[slug]/DocumentViewer.tsx
+++ b/src/app/document/view/[slug]/DocumentViewer.tsx
@@ -96,11 +96,11 @@ const DocumentViewer = ({ slug }: Readonly<{ slug: string }>) => {
{citation ? <>{citation}> : <>eeXiv:{hash}>}
{doi && (
-
- DOI:
- {doi}
-
-)}
+
+ DOI:
+ {doi}
+
+ )}
diff --git a/src/app/utils/hash.ts b/src/app/utils/hash.ts
index 06c992b..246d3a1 100644
--- a/src/app/utils/hash.ts
+++ b/src/app/utils/hash.ts
@@ -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)
}