Skip to content

Commit

Permalink
refactor: adjust feature-toggle logic to check only the cookie status…
Browse files Browse the repository at this point in the history
… && eslint autofix
  • Loading branch information
meta-panic committed Jan 6, 2025
1 parent 1c8ee84 commit 597d158
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const eslintConfig = [
{
rules: {
"comma-dangle": ["error", "always-multiline"],
"semi": ["warning", "always"],
"semi": ["warn", "always"],
},
},
];
Expand Down
9 changes: 0 additions & 9 deletions frontend/src/app/components/page.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/src/components/atoms/ColorBlock/ColorBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { createContext, ReactNode, } from 'react';
import React, { createContext, ReactNode } from 'react';
import classNames from 'classnames';
import styles from './ColorBlock.module.css';

Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/atoms/typography/Typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import styles from "./Typography.module.css";
import { TypographyTag } from "@/components/types";



interface BaseTypographyProps {
tag: TypographyTag;
children: React.ReactNode;
Expand Down Expand Up @@ -45,7 +44,7 @@ const Typography: FC<TypographyProps> = ({
{
[styles["typography--bold"]]: tag === "body" && props?.bold,
},
className
className,
);

return (
Expand All @@ -56,6 +55,6 @@ const Typography: FC<TypographyProps> = ({
</Component>
);

}
};

export default Typography;
5 changes: 0 additions & 5 deletions frontend/src/utils/isDebug.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { cookies } from "next/headers";

export const isDebug = async (): Promise<boolean> => {
const isDevelopment = process.env.NODE_ENV === 'development';
if (isDevelopment) {
return isDevelopment;
}

const cookieStore = cookies();
const hasDebugCookie = (await cookieStore).has('debugCookie');

Expand Down

0 comments on commit 597d158

Please sign in to comment.