Skip to content
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

Open
wants to merge 8 commits into
base: [email protected]
Choose a base branch
from

Conversation

Melly5
Copy link
Contributor

@Melly5 Melly5 commented Jul 18, 2024

No description provided.

Copy link

vercel bot commented Jul 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
big-quest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 18, 2024 0:38am

@@ -0,0 +1,55 @@
import { headers } from 'next/headers';
Copy link
Member

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 можно сделать отдельно, для обчного приложения тоже отдельно

Copy link
Contributor Author

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 всегда пустой, поэтому отказалась от них

единственный варик который вижу - отслеживать в мидлваре, но стоит ли оно сейчас того, жду предложений

Copy link
Contributor Author

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.
Comment on lines 25 to 32
const pathname = getPathnameFromMetadataState(parent);
const pathnameParts = pathname.split('/');
const lastPart = pathnameParts[pathnameParts.length - 1];

return {
title: `ЛК Организатора | ${organization.name} | ${ORGANIZATION_PROFILE_TAB_TEXTS[lastPart.toUpperCase()]}`
};
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можешь тут написать пример ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ЛК Организатора | ООО Рисовашки | Профиль

import { getUserSession } from '@/utils/helpers/server';

import AppLayout from './app/(main)/layout';
import Layout from './org/(panel)/layout';
Copy link
Contributor

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>
)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

у партнера же есть тоже layout какой-то?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

есть, но в него необходимо прокидывыть id организации у партнера, а у нас нет логики его хранения

я так понимаю как появится логика в духе:

авторизация партнера -> запрос на получение id организации по данным партнера -> отображение данных(страницы) по этому id

тогда и можно будет обернуть Layout-ом

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants