Skip to content

Commit

Permalink
🔥(frontend) remove temporarily team feature
Browse files Browse the repository at this point in the history
We want to make a first realease, but the
team feature is not ready yet.
So we will hide it for now by hiding the menu.
We will still let the feature in dev environment.
  • Loading branch information
AntoLC committed Aug 8, 2024
1 parent 7916f7d commit e225369
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/frontend/apps/desk/.env.development
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
NEXT_PUBLIC_API_ORIGIN=http://localhost:8071
NEXT_PUBLIC_FEATURE_TEAM=true
1 change: 1 addition & 0 deletions src/frontend/apps/desk/.env.test
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
NEXT_PUBLIC_API_ORIGIN=http://test.jest
NEXT_PUBLIC_FEATURE_TEAM=true
2 changes: 1 addition & 1 deletion src/frontend/apps/desk/src/core/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function MainLayout({ children }: PropsWithChildren) {
<Box $height="100vh">
<Header />
<Box $css="flex: 1;" $direction="row">
<Menu />
{process.env.NEXT_PUBLIC_FEATURE_TEAM === 'true' && <Menu />}
<Box
as="main"
$height={`calc(100vh - ${HEADER_HEIGHT})`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export const Panel = () => {
$minWidth: '0',
};

const styleNoTeam = process.env.NEXT_PUBLIC_FEATURE_TEAM !== 'true' && {
$display: 'none',
tabIndex: -1,
};

const transition = 'all 0.5s ease-in-out';

return (
Expand Down Expand Up @@ -52,6 +57,7 @@ export const Panel = () => {
transition: ${transition};
`}
onClick={() => setIsOpen(!isOpen)}
{...styleNoTeam}
>
<IconOpenClose width={24} height={24} aria-hidden="true" />
</BoxButton>
Expand Down
20 changes: 5 additions & 15 deletions src/frontend/apps/desk/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import type { ReactElement } from 'react';
import MailDomains from './mail-domains';
import Teams from './teams';

import { TeamLayout } from '@/features/teams/team-management';
import { NextPageWithLayout } from '@/types/next';

import Teams from './teams/';

const Page: NextPageWithLayout = () => {
return <Teams />;
};

Page.getLayout = function getLayout(page: ReactElement) {
return <TeamLayout>{page}</TeamLayout>;
};

export default Page;
export default process.env.NEXT_PUBLIC_FEATURE_TEAM === 'true'
? Teams
: MailDomains;

0 comments on commit e225369

Please sign in to comment.