Skip to content

Commit 30b36d4

Browse files
committed
Remove dead code.
Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
1 parent 498a6f6 commit 30b36d4

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

api/docs-feedback.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ interface FeedbackBody {
66
page_url: string
77
rating: 'yes' | 'no'
88
reason?: string
9-
timestamp?: string
109
}
1110

1211
function stripHtml(text: string): string {
@@ -68,7 +67,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
6867
return res.status(405).json({ error: 'Method not allowed' })
6968
}
7069

71-
const { page_url: pageUrl, rating, reason, timestamp } = req.body as FeedbackBody
70+
const { page_url: pageUrl, rating, reason } = req.body as FeedbackBody
7271

7372
if (!pageUrl || !rating || !['yes', 'no'].includes(rating)) {
7473
return res.status(400).json({ error: 'page_url and rating (yes/no) are required' })
@@ -84,7 +83,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
8483
return res.status(400).json({ error: 'reason is required for negative feedback' })
8584
}
8685

87-
const ts = timestamp ?? new Date().toISOString()
86+
const ts = new Date().toISOString()
8887

8988
try {
9089
await appendToSheet([

src/components/FeedbackWidget/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export default function FeedbackWidget(): React.ReactNode {
4040
page_url: window.location.pathname,
4141
rating,
4242
reason: reason.trim(),
43-
timestamp: new Date().toISOString(),
4443
}),
4544
})
4645
if (!res.ok) throw new Error(String(res.status))

src/theme/DocItem/Footer/index.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import styles from './styles.module.css'
1010
export default function DocItemFooter() {
1111
const { metadata } = useDoc()
1212
const { editUrl, lastUpdatedAt, formattedLastUpdatedAt, lastUpdatedBy } = metadata
13-
const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy)
1413

1514
return (
1615
<footer className={clsx(ThemeClassNames.docs.docFooter, 'docusaurus-mt-lg docusaurus-mb-lg')}>

0 commit comments

Comments
 (0)