more services added
This commit is contained in:
@@ -2,12 +2,12 @@ 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 })
|
||||
const PageToBeChildrendSingle: React.FC<ContentProps> = async ({ lang, translations, activePageUrl, mode }) => {
|
||||
const ApplicationToRender = await resolveWhichPageToRenderSingle({ activePageUrl })
|
||||
if (ApplicationToRender) {
|
||||
return <ApplicationToRender lang={lang} translations={translations} activePageUrl={activePageUrl} />
|
||||
return <ApplicationToRender lang={lang} translations={translations} activePageUrl={activePageUrl} mode={mode} />
|
||||
}
|
||||
else { return <ContentToRenderNoPage lang={lang} /> }
|
||||
return <ContentToRenderNoPage lang={lang} />
|
||||
}
|
||||
|
||||
export default PageToBeChildrendSingle
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 modeFromQuery = ModeTypesList.includes(mode || '') ? mode : 'shortList'
|
||||
const renderProps = { lang, translations, activePageUrl, mode: modeFromQuery as ModeTypes }
|
||||
const PageToBeChildrend = isMulti ? PageToBeChildrendMulti : PageToBeChildrendSingle
|
||||
const loadingContent = <LoadingContent height="h-16" size="w-36 h-48" plane="h-full w-full" />
|
||||
|
||||
Reference in New Issue
Block a user