- {change.change_type === 'update' && (
-
- 差分
- )} |
+
+ {change.change_type === 'update' && (
+
+ 差分
+ )}
+ |
diff --git a/frontend/src/types.ts b/frontend/src/types.ts
index dd54a19..1cfbc18 100644
--- a/frontend/src/types.ts
+++ b/frontend/src/types.ts
@@ -25,13 +25,29 @@ export type User = {
export type WikiPage = {
id: number
title: string
+ sha: string
+ pred?: string
+ succ?: string
updated_at?: string }
export type WikiPageChange = {
sha: string
+ pred?: string
+ succ?: string
wiki_page: WikiPage
user: User
change_type: string
timestamp: string }
+export type WikiPageDiff = {
+ wiki_page_id: number
+ title: string
+ older_sha: string
+ newer_sha: string
+ diff: WikiPageDiffDiff[] }
+
+export type WikiPageDiffDiff = {
+ type: 'context' | 'added' | 'removed'
+ content: string }
+
export type UserRole = typeof USER_ROLES[number]
|