🐛(app-desk) fix circular dependency problem

Some circular dependency problems started to appear with Jest.
This commit fixes the problem by removing the feature index
file and moving the exports to the respective feature.
This commit is contained in:
Anthony LC
2024-02-14 14:49:58 +01:00
committed by Anthony LC
parent 1e38174c1b
commit aba376702f
7 changed files with 7 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
import fetchMock from 'fetch-mock';
import { useAuthStore } from '@/features/';
import { useAuthStore } from '@/features/auth';
import { fetchAPI } from '../fetchApi';

View File

@@ -1,4 +1,4 @@
import { useAuthStore } from '@/features/';
import { useAuthStore } from '@/features/auth';
export const fetchAPI = async (input: string, init?: RequestInit) => {
const apiUrl = `${process.env.NEXT_PUBLIC_API_URL}${input}`;

View File

@@ -1,5 +1,6 @@
import { Box } from '@/components';
import { HEADER_HEIGHT, Header, Menu } from '@/features/';
import { HEADER_HEIGHT, Header } from '@/features/header';
import { Menu } from '@/features/menu';
export default function InnerLayout({
children,

View File

@@ -6,7 +6,7 @@ import styled from 'styled-components';
import { Box, StyledLink } from '@/components';
import { useCunninghamTheme } from '@/cunningham';
import { Panel } from '@/features';
import { Panel } from '@/features/teams';
const StyledButton = styled(Button)`
width: fit-content;

View File

@@ -4,7 +4,7 @@ import { Button, Field, Input } from '@openfun/cunningham-react';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useCreateTeam } from '@/features';
import { useCreateTeam } from '@/features/teams';
export default function Page() {
const { t } = useTranslation();

View File

@@ -4,7 +4,7 @@ import { PropsWithChildren } from 'react';
import { Box } from '@/components';
import { useCunninghamTheme } from '@/cunningham';
import { Panel } from '@/features';
import { Panel } from '@/features/teams';
export default function Layout({ children }: PropsWithChildren) {
const { colorsTokens } = useCunninghamTheme();

View File

@@ -1,5 +0,0 @@
export * from './auth/';
export * from './header/';
export * from './language/';
export * from './menu/';
export * from './teams/';