Skip to content

Commit

Permalink
[Regression]: Fix modal orders (All-Hands-AI#5779)
Browse files Browse the repository at this point in the history
Co-authored-by: Graham Neubig <[email protected]>
  • Loading branch information
malhotra5 and neubig authored Dec 26, 2024
1 parent d86b536 commit 3bf5956
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
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 } = useSettings();
const { settings } = useSettings();

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>
);
}

0 comments on commit 3bf5956

Please sign in to comment.