mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-21 22:11:37 +01:00
refactor: replace deprecated fields (#619)
* refactor: replace deprecated fields * refactor: finish wip
This commit is contained in:
parent
0a9ae34eb3
commit
828e26721a
7 changed files with 1 additions and 29 deletions
|
@ -842,10 +842,8 @@ input UpdateRoutingFeesParams {
|
|||
}
|
||||
|
||||
type UserBackupInfo {
|
||||
available_size: String!
|
||||
last_update: String
|
||||
last_update_size: String
|
||||
remaining_size: String!
|
||||
total_size_saved: String!
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ export type GetAmbossUserQuery = {
|
|||
last_update?: string | null;
|
||||
last_update_size?: string | null;
|
||||
total_size_saved: string;
|
||||
available_size: string;
|
||||
remaining_size: string;
|
||||
};
|
||||
ghost: { __typename?: 'UserGhostInfo'; username?: string | null };
|
||||
} | null;
|
||||
|
@ -39,8 +37,6 @@ export const GetAmbossUserDocument = gql`
|
|||
last_update
|
||||
last_update_size
|
||||
total_size_saved
|
||||
available_size
|
||||
remaining_size
|
||||
}
|
||||
ghost {
|
||||
username
|
||||
|
|
|
@ -12,8 +12,6 @@ export const GET_AMBOSS_USER = gql`
|
|||
last_update
|
||||
last_update_size
|
||||
total_size_saved
|
||||
available_size
|
||||
remaining_size
|
||||
}
|
||||
ghost {
|
||||
username
|
||||
|
|
|
@ -1204,10 +1204,8 @@ export type UpdateRoutingFeesParams = {
|
|||
|
||||
export type UserBackupInfo = {
|
||||
__typename?: 'UserBackupInfo';
|
||||
available_size: Scalars['String']['output'];
|
||||
last_update?: Maybe<Scalars['String']['output']>;
|
||||
last_update_size?: Maybe<Scalars['String']['output']>;
|
||||
remaining_size: Scalars['String']['output'];
|
||||
total_size_saved: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
|
|
|
@ -47,16 +47,10 @@ export const AmbossBackupsView = () => {
|
|||
if (!user) return null;
|
||||
|
||||
const {
|
||||
backups: {
|
||||
remaining_size,
|
||||
total_size_saved,
|
||||
last_update,
|
||||
last_update_size,
|
||||
},
|
||||
backups: { total_size_saved, last_update, last_update_size },
|
||||
} = user;
|
||||
|
||||
const total = Number(total_size_saved) / 1e6;
|
||||
const remaining = Number(remaining_size) / 1e6;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -74,10 +68,6 @@ export const AmbossBackupsView = () => {
|
|||
'Total Size Saved',
|
||||
`${numeral(total).format('0.[0000]')} MB`
|
||||
)}
|
||||
{renderLine(
|
||||
'Remaining Size Available',
|
||||
`${numeral(remaining).format('0.[0000]')} MB`
|
||||
)}
|
||||
<Separation />
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -9,10 +9,8 @@ export const getUserQuery = gql`
|
|||
upgradable
|
||||
}
|
||||
backups {
|
||||
available_size
|
||||
last_update
|
||||
last_update_size
|
||||
remaining_size
|
||||
total_size_saved
|
||||
}
|
||||
ghost {
|
||||
|
|
|
@ -20,12 +20,6 @@ export class UserBackupInfo {
|
|||
|
||||
@Field()
|
||||
total_size_saved: string;
|
||||
|
||||
@Field()
|
||||
available_size: string;
|
||||
|
||||
@Field()
|
||||
remaining_size: string;
|
||||
}
|
||||
|
||||
@ObjectType()
|
||||
|
|
Loading…
Add table
Reference in a new issue