🐛(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:
@@ -1,6 +1,6 @@
|
||||
import fetchMock from 'fetch-mock';
|
||||
|
||||
import { useAuthStore } from '@/features/';
|
||||
import { useAuthStore } from '@/features/auth';
|
||||
|
||||
import { fetchAPI } from '../fetchApi';
|
||||
|
||||
|
||||
@@ -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}`;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
export * from './auth/';
|
||||
export * from './header/';
|
||||
export * from './language/';
|
||||
export * from './menu/';
|
||||
export * from './teams/';
|
||||
Reference in New Issue
Block a user