Added feature flags system (#803)

* added feature flag system

* Update packages/web/src/core/services/featureFlags.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove process.env

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Dan Ditomaso
2025-08-22 13:47:24 -04:00
committed by GitHub
co-authored by Copilot
parent 1de92cd2e9
commit 449fb3ac36
5 changed files with 138 additions and 3 deletions
+15 -2
View File
@@ -1,4 +1,5 @@
import { cn } from "@core/utils/cn.ts";
import React from "react";
import { Trans } from "react-i18next";
type FooterProps = {
@@ -6,6 +7,18 @@ type FooterProps = {
};
const Footer = ({ className, ...props }: FooterProps) => {
const version = React.useMemo(
() => String(import.meta.env.VITE_VERSION)?.toUpperCase() || "",
[],
);
const commitHash = React.useMemo(
() =>
String(import.meta.env.VITE_COMMIT_HASH)
?.toUpperCase()
.slice(0, 7) || "unk",
[],
);
return (
<footer
className={cn(
@@ -16,13 +29,13 @@ const Footer = ({ className, ...props }: FooterProps) => {
>
<div className="px-2">
<span className="font-semibold text-gray-500/40 dark:text-gray-400/40">
{String(import.meta.env.VITE_VERSION)?.toUpperCase()}
{version}
</span>
<span className="font-semibold text-gray-500/40 dark:text-gray-400/40 mx-2">
-
</span>
<span className="font-semibold text-gray-500/40 dark:text-gray-400/40">
{`#${String(import.meta.env.VITE_COMMIT_HASH)?.toUpperCase()}`}
{`#${commitHash}`}
</span>
</div>
<p className="ml-auto mr-auto text-gray-500 dark:text-gray-400">