Separated typescript interfaces into its own file and polished and cleaned up overall code

This commit is contained in:
Keannu Christian Bernasol 2023-03-02 00:16:28 +08:00
parent a8c14f1331
commit 132dfa496d
11 changed files with 83 additions and 79 deletions

View 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;
}