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: type issues by using correct import #111

Merged

Conversation

DhruvArora-03
Copy link
Member

I replaced Status with StatusType, AutoLoadStatus with AutoLoadStatusType, and I added "typeof" in front of SiteSupport to fix another type error. Not too sure about that last one, I couldn't get it to work with SiteSupportType since we specifically want either of the 2 options.

@DhruvArora-03 DhruvArora-03 changed the base branch from main to hackathon February 27, 2024 02:17
Copy link

Your pull request title did not conform to conventional commits standards. Our upcoming automated release pipeline will automatically determine
the proper release version based on your pull request title.
Cheat Sheet

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

1 similar comment
Copy link

Your pull request title did not conform to conventional commits standards. Our upcoming automated release pipeline will automatically determine
the proper release version based on your pull request title.
Cheat Sheet

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

Copy link

Your pull request title did not conform to conventional commits standards. Our upcoming automated release pipeline will automatically determine
the proper release version based on your pull request title.
Cheat Sheet

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

@DhruvArora-03 DhruvArora-03 changed the title Fix type issues by using correct import fix: type issues by using correct import Feb 27, 2024
src/views/components/CourseCatalogMain.tsx Outdated Show resolved Hide resolved
src/views/components/injected/AutoLoad/AutoLoad.tsx Outdated Show resolved Hide resolved
src/views/components/CourseCatalogMain.tsx Outdated Show resolved Hide resolved
@DhruvArora-03 DhruvArora-03 requested a review from doprz February 27, 2024 04:22
Comment on lines +4 to +16
import AutoLoad from '@views/components/injected/AutoLoad/AutoLoad';
import CourseCatalogInjectedPopup from '@views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup';
import RecruitmentBanner from '@views/components/injected/RecruitmentBanner/RecruitmentBanner';
import TableHead from '@views/components/injected/TableHead';
import TableRow from '@views/components/injected/TableRow/TableRow';
import TableSubheading from '@views/components/injected/TableSubheading/TableSubheading';
import { useKeyPress } from '@views/hooks/useKeyPress';
import useSchedules from '@views/hooks/useSchedules';
import { CourseCatalogScraper } from '@views/lib/CourseCatalogScraper';
import getCourseTableRows from '@views/lib/getCourseTableRows';
import type { SiteSupportType } from '@views/lib/getSiteSupport';
import { populateSearchInputs } from '@views/lib/populateSearchInputs';
import ExtensionRoot from '@views/components/common/ExtensionRoot/ExtensionRoot';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, this is much cleaner.


interface Props {
support: typeof SiteSupport.COURSE_CATALOG_DETAILS | typeof SiteSupport.COURSE_CATALOG_LIST;
support: Extract<SiteSupportType, 'COURSE_CATALOG_DETAILS' | 'COURSE_CATALOG_LIST'>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@doprz doprz merged commit 1017db9 into Longhorn-Developers:hackathon Feb 28, 2024
3 of 5 checks passed
doprz pushed a commit that referenced this pull request Mar 6, 2024
* fix: use StatusType

* fix: use AutoLoadStatus

* fix: use typof SiteSupport.*

* fix: one more of Status to StatusType

* fix: use import type

* fix: use path alias imports

* fix: use Extract

* fix: remove unnecessary import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants