Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken declaration file #565

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/app/components/toaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ interface SnackbarProps extends ComponentProps<typeof MaterialDesignContent> {}
const Snackbar = forwardRef<HTMLDivElement, SnackbarProps>(({ className, message, ...props }, ref) => {
const ns = useI18nNamespaces();
const { t } = useTranslation(ns);
const translatedMessage = t(message, { defaultValue: message });
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const translatedMessage = t(message as any, { defaultValue: message });
return <MaterialDesignContent ref={ref} className={cn('!rounded-lg !border', className)} message={translatedMessage} {...props} />;
});

Expand Down
7 changes: 2 additions & 5 deletions frontend/app/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type communicationPreference from '../public/locales/en/communication-preferences.json';
import type communicationPreference from '../public/locales/en/communication-preference.json';
import type dataUnavailable from '../public/locales/en/data-unavailable.json';
import type demographicsOralHealthQuestions from '../public/locales/en/demographics-oral-health-questions.json';
import type dentalInsuranceQuestion from '../public/locales/en/dental-insurance-question.json';
import type gcweb from '../public/locales/en/gcweb.json';
Expand All @@ -7,8 +8,6 @@ import type intake from '../public/locales/en/intake.json';
import type letters from '../public/locales/en/letters.json';
import type personalInformation from '../public/locales/en/personal-information.json';
import type reviewInformation from '../public/locales/en/review-information.json';
import type dataUnavailable from '../public/locales/en/udata-unavailable.json';
import type updatePhoneNumber from '../public/locales/en/update-phone-number.json';
import type { PublicEnv } from '~/utils/env.server';

/**
Expand All @@ -30,7 +29,6 @@ declare module 'i18next' {
interface CustomTypeOptions {
defaultNS: false;
resources: {
'access-question': typeof accessQuestion;
'communication-preference': typeof communicationPreference;
'data-unavailable': typeof dataUnavailable;
'demographics-oral-health-questions': typeof demographicsOralHealthQuestions;
Expand All @@ -40,7 +38,6 @@ declare module 'i18next' {
intake: typeof intake;
letters: typeof letters;
'personal-information': typeof personalInformation;
'update-phone-number': typeof updatePhoneNumber;
'review-information': typeof reviewInformation;
};
}
Expand Down