Skip to content

Commit

Permalink
Refactor .js files to .ts and extract code
Browse files Browse the repository at this point in the history
  • Loading branch information
thePeras committed Nov 2, 2024
1 parent 30db459 commit 4c6a667
Show file tree
Hide file tree
Showing 17 changed files with 614 additions and 616 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import jsx from "texsaur";

import { AuthSession } from "../../types";
import HeaderLinks from "./HeaderLinks";
import Authentication from "./HeaderAuthentication";
import { AuthSession } from "../types";

//TODO(thePeras): I think we should move this to a separate file dedicated to constants or a folder like `data`
const HEADER_LINKS = {
Estudantes: {
Bolsas: "web_base.gera_pagina?p_pagina=242366",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import jsx from "texsaur";
import { AuthSession } from "../types";
import { togglePopover } from "../modules/utilities/popover";
import Icon from "./Icon";
import { AuthSession } from "../../types";
import { togglePopover } from "../../modules/utilities/popover";
import Icon from "../Icon";

interface Props {
auth: AuthSession | null;
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions content-scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import {
injectOverrideFunctions,
reverseDateDirection,
currentAccountPage,
addSortTableActions,
} from "./modules/initialize";
import { injectAllChanges, userPreferences } from "./modules/options";
import constructNewData from "./modules/utilities/constructNewData";
import constructNewData from "./modules/options/constructNewData";
import { getStorage, setStorage } from "./modules/utilities/storage";
import { rememberLogin } from "./modules/login";
import { replaceIcons } from "./modules/icons";
Expand All @@ -18,6 +17,7 @@ import { fixPagination } from "./modules/pagination";
import { changeLayout } from "./modules/layout";
import { addStarIconToCard } from "./modules/favorite-course";
import { createComponentsPage } from "./pages/components_page";
import { currentAccountPage } from "./pages/current_account_page";

/*--
- Docs: https://developer.chrome.com/docs/extensions/reference/storage/#synchronous-response-to-storage-updates
Expand Down
240 changes: 0 additions & 240 deletions content-scripts/modules/icons/constants.js

This file was deleted.

Loading

0 comments on commit 4c6a667

Please sign in to comment.