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

[Regression]: Fix modal orders #5779

Merged
merged 4 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/__tests__/routes/_oh.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("frontend/routes/_oh", () => {
await screen.findByTestId("root-layout");
});

it("should render the AI config modal if settings are not up-to-date", async () => {
it.skip("should render the AI config modal if settings are not up-to-date", async () => {
settingsAreUpToDateMock.mockReturnValue(false);
renderWithProviders(<RouteStub />);

Expand Down
13 changes: 1 addition & 12 deletions frontend/src/routes/_oh/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useConfig } from "#/hooks/query/use-config";
import { Sidebar } from "#/components/features/sidebar/sidebar";
import { WaitlistModal } from "#/components/features/waitlist/waitlist-modal";
import { AnalyticsConsentFormModal } from "#/components/features/analytics/analytics-consent-form-modal";
import { SettingsModal } from "#/components/shared/modals/settings/settings-modal";

export function ErrorBoundary() {
const error = useRouteError();
Expand Down Expand Up @@ -45,15 +44,12 @@ export function ErrorBoundary() {

export default function MainApp() {
const { gitHubToken } = useAuth();
const { settings, settingsAreUpToDate } = useUserPrefs();
const { settings } = useUserPrefs();

const [consentFormIsOpen, setConsentFormIsOpen] = React.useState(
!localStorage.getItem("analytics-consent"),
);

const [aiConfigModalIsOpen, setAiConfigModalIsOpen] =
React.useState(!settingsAreUpToDate);

const config = useConfig();
const { data: isAuthed, isFetching: isFetchingAuth } = useIsAuthed();

Expand Down Expand Up @@ -92,13 +88,6 @@ export default function MainApp() {
onClose={() => setConsentFormIsOpen(false)}
/>
)}

{aiConfigModalIsOpen && (
<SettingsModal
onClose={() => setAiConfigModalIsOpen(false)}
data-testid="ai-config-modal"
/>
)}
</div>
);
}
Loading