mirror of
https://github.com/lemeow125/React-NotesApp.git
synced 2025-05-17 03:48:10 +08:00
Separated typescript interfaces into its own file and polished and cleaned up overall code
This commit is contained in:
parent
a8c14f1331
commit
132dfa496d
11 changed files with 83 additions and 79 deletions
51
src/Interfaces/Interfaces.tsx
Normal file
51
src/Interfaces/Interfaces.tsx
Normal file
|
@ -0,0 +1,51 @@
|
|||
// Redux Interfaces
|
||||
export interface LoginState {
|
||||
Login: { logged_in: boolean };
|
||||
}
|
||||
|
||||
export interface LoggedInUserState {
|
||||
LoggedInUser: {
|
||||
value: {
|
||||
email: string;
|
||||
id: number;
|
||||
username: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
// Component Props Interfaces
|
||||
|
||||
export interface NoteProps {
|
||||
title: string;
|
||||
content: string;
|
||||
id: number;
|
||||
date_created: string;
|
||||
}
|
||||
|
||||
export interface IconProps {
|
||||
size: number;
|
||||
color: string;
|
||||
}
|
||||
|
||||
// API Interfaces
|
||||
|
||||
export interface RegistrationParams {
|
||||
email: string;
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface LoginParams {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface ActivationParams {
|
||||
uid: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
export interface AddNoteParams {
|
||||
title: string;
|
||||
content: string;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue