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

Updates component imports to full path #264

Merged
merged 3 commits into from
Nov 7, 2024
Merged

Conversation

rosschapman
Copy link
Collaborator

@rosschapman rosschapman commented Nov 7, 2024

This is actually necessary to fix tests from breaking, which was never a concern before we started writing them. The underlying module loading that happens when running tests will attempt to load every component in the index.ts file. This can cause the test to break because the test has not setup all the context and state for some of the other components in the index.ts file to work. For example, a newly added test in this PR requires this change.

I'm not sure why the code was written this way originally. It's quite old. It may have been an early react organization pattern.

app/App.tsx Outdated
@@ -4,14 +4,16 @@ import React, { useEffect, useState } from "react";
// https://support.google.com/analytics/answer/12938611#zippy=%2Cin-this-article
import ReactGA_4 from "react-ga4";
import { Helmet } from "react-helmet-async";
import { useLocation, useNavigate } from "react-router-dom";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: unused var

@rosschapman rosschapman merged commit d7159a4 into main Nov 7, 2024
1 check passed
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