mirror of
https://github.com/IRS-Public/direct-file.git
synced 2025-06-27 20:25:52 +00:00
fix: remove deprecated navigator.platform and unused variables
- Remove deprecated navigator.platform API usage - Remove unused variables: browserLanguage, platform, timeZoneOffset - Clean up dead code in taxReturnCreate.ts and PreviewTaxReturns.tsx These variables were declared but never used in the request bodies, creating unnecessary code clutter. The navigator.platform API is also deprecated according to MDN documentation. This change improves code maintainability and eliminates deprecation warnings without affecting functionality.
This commit is contained in:
parent
9dd76a786e
commit
1742f8cdbe
2 changed files with 0 additions and 8 deletions
|
@ -22,10 +22,6 @@ const PreviewTaxReturns = () => {
|
|||
const handlePreview = useCallback(async () => {
|
||||
const url = `${import.meta.env.VITE_BACKEND_URL}v1/taxreturns/${currentTaxReturnId}/preview`;
|
||||
const alertKey = SystemAlertKey.PREVIEW;
|
||||
const browserLanguage: string = navigator.language;
|
||||
// TODO: navigator.platform is deprecated: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
|
||||
const platform: string = navigator.platform ? navigator.platform : ``;
|
||||
const timeZoneOffset: number = new Date().getTimezoneOffset();
|
||||
const facts = JSON.parse(factGraph.toJSON());
|
||||
|
||||
try {
|
||||
|
|
|
@ -10,10 +10,6 @@ import { TaxReturn } from '../../../types/core.js';
|
|||
* then trigger any logging on this fetch.
|
||||
*/
|
||||
export async function taxReturnCreate(): Promise<TaxReturn> {
|
||||
const browserLanguage: string = navigator.language;
|
||||
// TODO: navigator.platform is deprecated: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
|
||||
const platform: string = navigator.platform ? navigator.platform : ``;
|
||||
const timeZoneOffset: number = new Date().getTimezoneOffset();
|
||||
const year = Number.parseInt(CURRENT_TAX_YEAR);
|
||||
|
||||
return await save<TaxReturn>(`${import.meta.env.VITE_BACKEND_URL}v1/taxreturns`, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue