updated docs

This commit is contained in:
2025-05-13 18:45:23 +03:00
parent 6dfa17c5e6
commit 3627412fe9
247 changed files with 30258 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { ContentProps } from "@/validations/mutual/dashboard/props";
import { resolveWhichPageToRenderMulti } from "@/pages/resolver/resolver";
import ContentToRenderNoPage from "@/pages/mutual/noContent/page";
const PageToBeChildrendMulti: React.FC<ContentProps> = async ({ lang, translations, activePageUrl, mode }) => {
const ApplicationToRender = await resolveWhichPageToRenderMulti({ activePageUrl })
if (!ApplicationToRender) return <ContentToRenderNoPage lang={lang} />
return <ApplicationToRender lang={lang} translations={translations} activePageUrl={activePageUrl} mode={mode} />
}
export default PageToBeChildrendMulti

View File

@@ -0,0 +1,13 @@
import { ContentProps } from "@/validations/mutual/dashboard/props";
import ContentToRenderNoPage from "@/pages/mutual/noContent/page";
import { resolveWhichPageToRenderSingle } from "@/pages/resolver/resolver";
const PageToBeChildrendSingle: React.FC<ContentProps> = ({ lang, translations, activePageUrl }) => {
const ApplicationToRender = resolveWhichPageToRenderSingle({ activePageUrl })
if (ApplicationToRender) {
return <ApplicationToRender lang={lang} translations={translations} activePageUrl={activePageUrl} />
}
else { return <ContentToRenderNoPage lang={lang} /> }
}
export default PageToBeChildrendSingle

View File

@@ -0,0 +1,19 @@
'use server';
import { FC, Suspense } from "react";
import { ContentProps, ModeTypesList } from "@/validations/mutual/dashboard/props";
import LoadingContent from "@/components/mutual/loader/component";
import PageToBeChildrendSingle from "./PageToBeChildrendSingle";
import PageToBeChildrendMulti from "./PageToBeChildrendMulti";
const ContentComponent: FC<ContentProps> = async ({ lang, translations, activePageUrl, isMulti, mode }) => {
const modeFromQuery = ModeTypesList.includes(mode || '') ? mode : 'list'
const renderProps = { lang, translations, activePageUrl, mode: modeFromQuery }
const PageToBeChildrend = isMulti ? PageToBeChildrendMulti : PageToBeChildrendSingle
const loadingContent = <LoadingContent height="h-16" size="w-36 h-48" plane="h-full w-full" />
const classNameDiv = "fixed top-24 left-80 right-0 py-10 px-15 border-emerald-150 border-l-2 overflow-y-auto h-[calc(100vh-64px)]"
return (
<div className={classNameDiv}><Suspense fallback={loadingContent}><PageToBeChildrend {...renderProps} /></Suspense></div>
);
};
export default ContentComponent;