Skip to content

Commit

Permalink
prescription phrases replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
midas-png committed Dec 12, 2023
1 parent 4643c3c commit 7345d54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ project structure inside the `src` folder and import the pages of FSD to the `pa

Another way to solve the conflict issue is to rename the `pages` layer within the FSD structure to avoid conflicts
with the `pages` folder in NextJS.
You should rename the `pages` layer within FSD to `views`.
You can rename the `pages` layer within FSD to `views`.
This way, the project structure within the `src` folder will be preserved without conflicting with NextJS requirements.

```sh
Expand All @@ -56,7 +56,7 @@ which plays the role of a common wrapping component for all application pages.

### Importing app functionality to `pages/_app.tsx` file

To solve the problem of the absence of the `app` folder in the NextJS structure you should create `App` component inside `app` layer to import it inside `pages/_app.tsx` file for NextJS to work with it.
To solve the problem of the absence of the `app` folder in the NextJS structure you can create `App` component inside `app` layer to import it inside `pages/_app.tsx` file for NextJS to work with it.
For example:

```tsx
Expand All @@ -76,7 +76,7 @@ const App = ({ Component, pageProps }: AppProps) => {

export default App;
```
Need to import created `App` component and global styles of the project to `pages/_app.tsx` like this:
You can import created `App` component and global styles of the project to `pages/_app.tsx` like this:

```tsx
// pages/_app.tsx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NextJS предлагает использовать папку `pages` для
### Переименование папки `pages` в структуре FSD

Другой способ решить проблему - переименовать слой `app` в структуре FSD, чтобы избежать конфликтов с папкой `pages` NextJS.
Вам следует переименовать слой `app` в FSD в `views`.
Вы можете переименовать слой `app` в FSD в `views`.
Таким образом, структура проекта в папке `src` будет сохранена, не вступая в противоречие с требованиями NextJS.

```sh
Expand All @@ -55,7 +55,7 @@ __Оба подхода к разрешению конфликтов также

### Импорт функциональности в `pages/_app.tsx`

Чтобы решить проблему отсутствия папки `app` в структуре NextJS, вам следует создать компонент `App` внутри слоя `app` и импортировать его в `pages/_app.tsx`, чтобы NextJS мог с ним работать.
Чтобы решить проблему отсутствия папки `app` в структуре NextJS, вы можете создать компонент `App` внутри слоя `app` и импортировать его в `pages/_app.tsx`, чтобы NextJS мог с ним работать.
Например:

```tsx
Expand All @@ -75,7 +75,7 @@ const App = ({ Component, pageProps }: AppProps) => {

export default App;
```
Необходимо импортировать созданный компонент `App` и глобальные стили проекта в `pages/_app.tsx` следующим образом:
Затем вы можете импортировать созданный компонент `App` и глобальные стили проекта в `pages/_app.tsx` следующим образом:

```tsx
// pages/_app.tsx
Expand Down

0 comments on commit 7345d54

Please sign in to comment.