Skip to content

refactor: Move feature flag config to the public dir #3322

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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 src/frontend/src/components/authSettingsGuard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FeatureFlags from "@/../feature-config.json";
import FeatureFlags from "@/../public/feature-config.json";
import useAuthStore from "@/stores/authStore";
import { useStoreStore } from "@/stores/storeStore";
import { Navigate } from "react-router-dom";
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/components/chatComponent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FeatureFlags from "@/../feature-config.json";
import FeatureFlags from "@/../public/feature-config.json";
import { Transition } from "@headlessui/react";
import { useMemo, useState } from "react";
import { useHotkeys } from "react-hotkeys-hook";
Expand Down
9 changes: 3 additions & 6 deletions src/frontend/src/components/headerComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "../../constants/constants";
import { AuthContext } from "../../contexts/authContext";

import FeatureFlags from "@/../feature-config.json";
import FeatureFlags from "@/../public/feature-config.json";
import { useLogout } from "@/controllers/API/queries/auth";
import useAuthStore from "@/stores/authStore";
import useAlertStore from "../../stores/alertStore";
Expand Down Expand Up @@ -185,10 +185,7 @@ export default function Header(): JSX.Element {
className="side-bar-button-size"
/>
) : (
<IconComponent
name="MoonIcon"
className="side-bar-button-size"
/>
<IconComponent name="MoonIcon" />
)}
</button>
)}
Expand All @@ -206,7 +203,7 @@ export default function Header(): JSX.Element {
</AlertDropdown>

<>
<Separator orientation="vertical" />
{/* <Separator orientation="vertical" /> */}
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/pages/FlowPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FeatureFlags from "@/../feature-config.json";
import FeatureFlags from "@/../public/feature-config.json";
import { useGetGlobalVariables } from "@/controllers/API/queries/variables";
import useSaveFlow from "@/hooks/flows/use-save-flow";
import { SaveChangesModal } from "@/modals/saveChangesModal";
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/pages/SettingsPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FeatureFlags from "@/../feature-config.json";
import FeatureFlags from "@/../public/feature-config.json";
import useAuthStore from "@/stores/authStore";
import { useStoreStore } from "@/stores/storeStore";
import { Outlet } from "react-router-dom";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FeatureFlags from "@/../feature-config.json";
import FeatureFlags from "@/../public/feature-config.json";
import {
EDIT_PASSWORD_ALERT_LIST,
EDIT_PASSWORD_ERROR_ALERT,
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/stores/storeStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FeatureFlags from "@/../feature-config.json";
import FeatureFlags from "@/../public/feature-config.json";
import { create } from "zustand";
import { checkHasApiKey, checkHasStore } from "../controllers/API";
import { StoreStoreType } from "../types/zustand/store";
Expand Down
Loading