mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -04:00
Revert "fix: replace class BaseUrlFromEnvExtractor"
This reverts commit 59bca4a81f
.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
21ef5a0899
commit
7f5fd18e38
6 changed files with 105 additions and 95 deletions
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
import { getNote } from '../../../api/notes'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { baseUrlFromEnvExtractor } from '../../../utils/base-url-from-env-extractor'
|
||||
import { notFound } from 'next/navigation'
|
||||
import { extractBaseUrls } from '../../../utils/base-url-from-env-extractor'
|
||||
|
||||
interface PageProps {
|
||||
params: { id: string | undefined }
|
||||
|
@ -16,7 +16,7 @@ interface PageProps {
|
|||
* Redirects the user to the editor if the link is a root level direct link to a version 1 note.
|
||||
*/
|
||||
const DirectLinkFallback = async ({ params }: PageProps) => {
|
||||
const baseUrl = extractBaseUrls().editor
|
||||
const baseUrl = baseUrlFromEnvExtractor.extractBaseUrls().editor
|
||||
|
||||
if (params.id === undefined) {
|
||||
notFound()
|
||||
|
|
|
@ -11,7 +11,7 @@ import { MotdModal } from '../../components/global-dialogs/motd-modal/motd-modal
|
|||
import { DarkMode } from '../../components/layout/dark-mode/dark-mode'
|
||||
import { UiNotificationBoundary } from '../../components/notifications/ui-notification-boundary'
|
||||
import { StoreProvider } from '../../redux/store-provider'
|
||||
import { extractBaseUrls } from '../../utils/base-url-from-env-extractor'
|
||||
import { baseUrlFromEnvExtractor } from '../../utils/base-url-from-env-extractor'
|
||||
import { configureLuxon } from '../../utils/configure-luxon'
|
||||
import type { Metadata } from 'next'
|
||||
import React from 'react'
|
||||
|
@ -20,7 +20,7 @@ import { getConfig } from '../../api/config'
|
|||
configureLuxon()
|
||||
|
||||
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
const baseUrls = extractBaseUrls()
|
||||
const baseUrls = baseUrlFromEnvExtractor.extractBaseUrls()
|
||||
const frontendConfig = await getConfig(baseUrls.editor)
|
||||
|
||||
return (
|
||||
|
|
|
@ -8,12 +8,12 @@ import { ApplicationLoader } from '../../components/application-loader/applicati
|
|||
import { BaseUrlContextProvider } from '../../components/common/base-url/base-url-context-provider'
|
||||
import { FrontendConfigContextProvider } from '../../components/common/frontend-config-context/frontend-config-context-provider'
|
||||
import { StoreProvider } from '../../redux/store-provider'
|
||||
import { extractBaseUrls } from '../../utils/base-url-from-env-extractor'
|
||||
import { baseUrlFromEnvExtractor } from '../../utils/base-url-from-env-extractor'
|
||||
import React from 'react'
|
||||
import { getConfig } from '../../api/config'
|
||||
|
||||
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
const baseUrls = extractBaseUrls()
|
||||
const baseUrls = baseUrlFromEnvExtractor.extractBaseUrls()
|
||||
const frontendConfig = await getConfig(baseUrls.renderer)
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue