Conversation
Open
✅ Deploy Preview for cheerful-lily-b65942 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
BigTows
requested changes
May 20, 2022
| return ( | ||
| <ViewLayout><Component {...pageProps} /></ViewLayout> | ||
| ) | ||
| const getLayout = Component.getLayout ?? ((page:any)=> page) |
Member
There was a problem hiding this comment.
ааааа теперь понял)
Смотри у тебя сейчас куча дублей кода, давай так:
- Если Component приводит свой Layout то мы его подставляем
- Если же Component не выдвигает свой Layout, то мы подставляем по умолчанию:
<ViewLayout>
{page}
</ViewLayout>
Collaborator
Author
There was a problem hiding this comment.
Ну дубли есть как бы), для каждой страницы лэйаут, а ты о чем?
Member
There was a problem hiding this comment.
Если ты НЕ переопределил функцию в компоненте, то подставлять ViewLayout иначе то что вернула функция. Тогда дубли уйдут
Collaborator
Author
There was a problem hiding this comment.
не понял а что это еще не закрытый тикет чтоль
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.