Commit Graph

6 Commits

Author SHA1 Message Date
Oliver Eyton-Williams
3b560deab6 refactor: stop spreading challenge over the node (#44499)
* refactor: stop spreading challenge over the node

Instead of creating a Gatsby node with id of challenge.id, we create a
single node field that has all the challenge data.

While this makes the GraphQL queries more verbose, it means we're free
to create multiple nodes with the same challenge.id.

* test: update time-line test for new GQL schema

* test: update mocks with new GQL schema
2021-12-14 12:11:20 -06:00
Ahmad Abdolsaheb
513f27e408 feat: add seasonal learn alert (#44335)
* feat:  add seasonal learn alert

* Update client/src/components/Intro/index.tsx

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* Update client/src/pages/learn.tsx

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-11-30 09:35:35 -08:00
awu43
f8aa621672 delete old ts-ignore comments (#43329) 2021-08-27 23:38:30 +02:00
Oliver Eyton-Williams
e118dda13a fix: order imports and remove circular dependencies (#41824)
* fix: remove circular dependency

redux depended on templates/Challenges/redux and vice versa.  This
meant that import order mattered and confusing bugs could arise.

(cherry picked from commit 7d67a4e70922bbb3051f2f9982dcc69e240d43dc)

* feat: require imports to be in alphabetical order

Import order generally does not matter, but there are edge cases
(circular  imports and css imports, for example) where changing order
changes behaviour

(cherry picked from commit b8d1393a91ec6e068caf8e8498a5c95df68c2b2c)

* chore: order imports

* fix: lift up challenge description + title comps

This brings the classic Show closer to the others as they
now all create the description and title components

* fix: remove donation-saga/index circular import

(cherry picked from commit 51a44ca668a700786d2744feffeae4fdba5fd207)

* refactor: extract action-types from settings

(cherry picked from commit 25e26124d691c84a0d0827d41dafb761c686fadd)

* fix: lint errors

* feat: prevent useless renames
2021-08-02 08:39:40 -05:00
ABHINAV SHARMA
de261a2b58 feat(client): ts-migrate LearnLayout component (#42644)
* feat(client) Renamed Learn.js to learn.tsx

* feat(client) ts-migrate LearnLayout Component

* rename types for convention

* fix(client) disable ts error for DonationModal usage

- DonationModal migration required typescript to fix error hence disable ts error in LearnLayout component

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2021-06-30 20:52:18 +05:30
awu43
e54e2588bf feat(client): ts-migrate client/src/pages (#42445)
* Renamed .js files to .tsx

* Migrated 404 to TS

TODO: Ask about default prop

* Migrated certification to TS

Converted to functional component

* Partially migrated challenges to TS

TODO: Ask about Redirect props

* Installed @types/react-helmet and @types/react-redux

Prep for migrating donate, this caused two new TS errors on 404 and certification

* Migrated donate to TS

TODO: Ask about prop spreading

* Migrated email-sign-up to TS

Converted to functional component and removed unused isSignedIn prop

* Migrated index to TS

Removed unused props

* Migrated learn to TS

* Installed @types/react-instantsearch-dom

Prep for migrating search

* Migrated search to TS

Converted to functional component

* Migrated settings to TS

* Migrated unsubscribed to TS

* Installed @types/validator and @types/lodash-es

Prep for migrating update-email

* Migrated update-email to TS

Converted to functional component

* Migrated user to TS

* Updated effect hook dependencies

Also removed unnecessary comments from 404

* Renamed challenges.test.tsx to .ts

* remove search.tsx, as search.js was removed

* revert: packages

* revert: packages

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2021-06-30 20:50:57 +05:30