-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,121 @@ | ||
import type { NativeStackScreenProps } from '@react-navigation/native-stack'; | ||
|
||
export type RootStackParamList = { | ||
Login: undefined; | ||
Join: undefined; | ||
Introduction: undefined; | ||
Home: undefined; | ||
Translate: undefined; | ||
Search: undefined; | ||
Calendar: undefined; | ||
FullText: undefined; | ||
SearchResult: undefined; | ||
Login: undefined; | ||
Join: undefined; | ||
Introduction: undefined; | ||
Home: undefined; | ||
Translate: undefined; | ||
Search: undefined; | ||
Calendar: undefined; | ||
FullText: undefined; | ||
SearchResult: undefined; | ||
}; | ||
|
||
export type Navigation = NativeStackScreenProps<RootStackParamList, 'Home'>; | ||
|
||
export type TextInput = { | ||
errorText: string; | ||
description: string; | ||
errorText: string; | ||
description: string; | ||
} | ||
|
||
interface Children { | ||
cid: number, | ||
cname?: string, | ||
cProfileImg?: number, | ||
color?: number, | ||
cid: number, | ||
cname?: string, | ||
cprofileImg: number, | ||
color?: number, | ||
} | ||
|
||
interface JoinData { | ||
uid?: number, | ||
uprofileImg?: number, | ||
username?: string, | ||
ulanguage?: string, | ||
uchildren?: { cname: string, cprofileImg: number, color: number }[] | ||
interface UserInfo { | ||
uid?: number, | ||
uprofileImg?: number, | ||
username?: string, | ||
ulanguage?: string, | ||
} | ||
|
||
interface UserData extends JoinData { | ||
interface JoinData extends UserInfo { | ||
uchildren?: { cname?: string, cprofileImg: number, color?: number }[] | ||
} | ||
|
||
interface UserData extends UserInfo { | ||
uchildren?: Children[], | ||
uemail?: string | undefined, | ||
uproviderType?: string | undefined, | ||
uroleType?: string | undefined, | ||
} | ||
|
||
interface AuthData { | ||
access_token?: string, | ||
refresh_token?: string, | ||
access_token?: string, | ||
refresh_token?: string, | ||
} | ||
|
||
interface AuthResponse { | ||
header: AuthData, | ||
body: UserData | ||
header: AuthData, | ||
body: UserData | ||
} | ||
|
||
interface AuthContextData { | ||
authData?: AuthData; | ||
userData?: UserData; | ||
loading: boolean; | ||
update: boolean; | ||
update: boolean; | ||
signUp(data: JoinData): Promise<void>; | ||
signIn(accessToken: string): Promise<void>; | ||
signOut(): void; | ||
handleUpdate(): void; | ||
handleUpdate(): void; | ||
}; | ||
interface Event { | ||
id: number, | ||
content: string, | ||
date?: string, | ||
highlight: boolean, | ||
registered: boolean | ||
id: number, | ||
content: string, | ||
date?: string, | ||
highlight: boolean, | ||
registered: boolean | ||
} | ||
|
||
interface Result { | ||
id?: number, | ||
imageUri?: string, | ||
fullText: Event[], | ||
korean: string, | ||
trans_full?: string | ||
id?: number, | ||
imageUri?: string, | ||
fullText: Event[], | ||
korean: string, | ||
trans_full?: string | ||
} | ||
|
||
interface Notice { | ||
date: string, | ||
results: Result[] | ||
date: string, | ||
results: Result[] | ||
} | ||
|
||
interface Notices { | ||
date: string, | ||
saved_titles: string[] | ||
date: string, | ||
saved_titles: string[] | ||
} | ||
|
||
interface BottomDrawerProps { | ||
results: Result, | ||
showKorean?: boolean, | ||
isFullDrawer?: boolean, | ||
isTranslateScreen?: boolean, | ||
openSaveForm?: boolean, | ||
handleKorean?: () => void, | ||
saveResults?: (form: ResultsForm) => void, | ||
closeResults?: () => void, | ||
retakePicture?: () => void, | ||
handleOpenSaveForm?: () => void | ||
results: Result, | ||
showKorean?: boolean, | ||
isFullDrawer?: boolean, | ||
isTranslateScreen?: boolean, | ||
openSaveForm?: boolean, | ||
handleKorean?: () => void, | ||
saveResults?: (form: ResultsForm) => void, | ||
closeResults?: () => void, | ||
retakePicture?: () => void, | ||
handleOpenSaveForm?: () => void | ||
} | ||
|
||
interface EventForm { | ||
title: string, | ||
date: string, | ||
cid: number, | ||
description: string | ||
title: string, | ||
date: string, | ||
cid: number, | ||
description: string | ||
} | ||
|
||
interface ResultsForm { | ||
cid: number, | ||
title: string | ||
cid: number, | ||
title: string | ||
} | ||
|
||
export type { | ||
UserData, JoinData, AuthData, AuthResponse, AuthContextData, Children, | ||
Event, Result, Notice, Notices, BottomDrawerProps, EventForm, ResultsForm | ||
UserData, JoinData, AuthData, AuthResponse, AuthContextData, Children, | ||
Event, Result, Notice, Notices, BottomDrawerProps, EventForm, ResultsForm | ||
} |