refactor: replace deprecated fields (#619)

* refactor: replace deprecated fields

* refactor: finish wip
This commit is contained in:
secondl1ght 2024-12-23 15:40:49 -07:00 committed by GitHub
parent 0a9ae34eb3
commit 828e26721a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1 additions and 29 deletions

View file

@ -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!
}

View file

@ -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

View file

@ -12,8 +12,6 @@ export const GET_AMBOSS_USER = gql`
last_update
last_update_size
total_size_saved
available_size
remaining_size
}
ghost {
username

View file

@ -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'];
};

View file

@ -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 />
</>
);

View file

@ -9,10 +9,8 @@ export const getUserQuery = gql`
upgradable
}
backups {
available_size
last_update
last_update_size
remaining_size
total_size_saved
}
ghost {

View file

@ -20,12 +20,6 @@ export class UserBackupInfo {
@Field()
total_size_saved: string;
@Field()
available_size: string;
@Field()
remaining_size: string;
}
@ObjectType()