Skip to content

Commit

Permalink
fix: ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sirpy committed Jul 9, 2024
1 parent 01d40ca commit 3eac394
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/hooks/apollo/useCreateMongoDbApolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const useCreateMongoDbApolloClient = (): ApolloClient<any> | undefined =>

const httpLink = new HttpLink({
uri: mongoDbUri,
fetch: async (uri, options) => {
fetch: async (url, options) => {
const accessToken = await getValidAccessToken();
if (!options) {
options = {};
Expand All @@ -55,7 +55,7 @@ export const useCreateMongoDbApolloClient = (): ApolloClient<any> | undefined =>
options.headers = {};
}
(options.headers as Record<string, any>).Authorization = `Bearer ${accessToken}`;
return fetch(uri, options);
return fetch(url as string, options);
},
});

Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/lib/totalDurationInSeconds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { Frequency } from '../models/constants';
export const totalDurationInSeconds = (duration: number, frequency: Frequency): number => {
if (frequency === Frequency.OneTime) {
return 0;
} else if (frequency === Frequency.Daily) {
return duration * 24 * 60 * 60;
} else if (frequency === Frequency.Weekly) {
return duration * 7 * 24 * 60 * 60;
}

const now = new Date();
Expand Down
6 changes: 0 additions & 6 deletions packages/app/src/utils/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,7 @@ export function getDonateStyles(state: ButtonState): DonateStylesResult {

export function getFrequencyPlural(frequency: Frequency) {
switch (frequency) {
case 'Daily':
return 'Days';
case 'Weekly':
return 'Weeks';
case 'Monthly':
return 'Months';
case 'Yearly':
return 'Years';
}
}
2 changes: 1 addition & 1 deletion packages/app/web/shim.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// fix uniswap sdk issue
globalThis.Browser = {
(globalThis as any).Browser = {
T: () => {},
};

0 comments on commit 3eac394

Please sign in to comment.