-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
technical/layout into [email protected] 🐢 minor global changes (not found page, page metadata, titles) #76
base: [email protected]
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
app/not-found.tsx
Outdated
@@ -0,0 +1,55 @@ | |||
import { headers } from 'next/headers'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не нужно делать 1 not found на все, not found можно реализоваывать на каждый сегмент org можно сделать отдельно, для обчного приложения тоже отдельно
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вчера выяснили точно, что такая история не прокатит, возможен только глобальный not-found, поэтому думала как предложила отслеживать через isOrg и isPartner, но выявила проблему что при рендере referer всегда пустой, поэтому отказалась от них
единственный варик который вижу - отслеживать в мидлваре, но стоит ли оно сейчас того, жду предложений
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- добавила метадату, для app/activities в ветке 282 положу сразу
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
const pathname = getPathnameFromMetadataState(parent); | ||
const pathnameParts = pathname.split('/'); | ||
const lastPart = pathnameParts[pathnameParts.length - 1]; | ||
|
||
return { | ||
title: `ЛК Организатора | ${organization.name} | ${ORGANIZATION_PROFILE_TAB_TEXTS[lastPart.toUpperCase()]}` | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можешь тут написать пример ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ЛК Организатора | ООО Рисовашки | Профиль
app/org/(panel)/organizations/[organizationId]/(constants)/navigation.tsx
Outdated
Show resolved
Hide resolved
app/not-found.tsx
Outdated
import { getUserSession } from '@/utils/helpers/server'; | ||
|
||
import AppLayout from './app/(main)/layout'; | ||
import Layout from './org/(panel)/layout'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OrgLayout
<div className='h-screen w-screen'> | ||
<NotFoundComponent link={ROUTES.PARTNER.ROOT} /> | ||
</div> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
у партнера же есть тоже layout какой-то?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
есть, но в него необходимо прокидывыть id организации у партнера, а у нас нет логики его хранения
я так понимаю как появится логика в духе:
авторизация партнера -> запрос на получение id организации по данным партнера -> отображение данных(страницы) по этому id
тогда и можно будет обернуть Layout-ом
No description provided.