Skip to content
Snippets Groups Projects
Commit c9c91231 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

make hdl configurable

parent 88f0ec47
No related branches found
No related tags found
No related merge requests found
Pipeline #55751 passed
import React from 'react'
import { HDL_URL } from '../../../../src/constants'
import { ErrorComponent } from '../../../../src/components/ErrorComponent'
import { GetServerSideProps } from 'next'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
......@@ -24,7 +25,7 @@ import Cloud from '@mui/icons-material/Cloud'
import VerifiedIcon from '@mui/icons-material/Verified'
import ReportIcon from '@mui/icons-material/Report'
const resolvePid = (pid: string) => `https://hdl.handle.net/${pid}`
const resolvePid = (pid: string) => HDL_URL + `/${pid}`
const ShowFDO = () => {
const { params } = useParsed()
......
import React from 'react'
import { ErrorComponent } from '../../../../src/components/ErrorComponent'
import { GetServerSideProps } from 'next'
import { HDL_URL } from '../../../../src/constants'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { useShow, useTranslate, useParsed, useCustom, useApiUrl } from '@refinedev/core'
import { Show } from '@refinedev/mui'
......@@ -26,7 +27,7 @@ import ReportIcon from '@mui/icons-material/Report'
import { styled, ThemeProvider } from '@mui/material/styles'
import Details from '../../../../src/components/fdos/details'
const resolvePid = (pid: string) => `https://hdl.handle.net/${pid}`
const resolvePid = (pid: string) => HDL_URL + `/${pid}`
const ShowFDO = () => {
const { params } = useParsed()
......
import { IResourceComponentsProps } from '@refinedev/core'
import { HDL_URL } from '../../constants'
import Link from '@mui/material/Link'
import { List, useDataGrid } from '@refinedev/mui'
......@@ -33,7 +34,7 @@ const columns: Array<GridColDef<IProfile>> = [
width: 300,
renderCell: (params) => {
const pid = params?.row.attributes.pid
return <Link href={'https://hdl.handle.net/' + pid}>{pid}</Link>
return <Link href={HDL_URL + '/' + pid}>{pid}</Link>
}
}
]
......
import { version } from './version'
export const API_URL = process.env.NEXT_PUBLIC_API_URL || '/api'
export const HDL_URL = process.env.NEXT_PUBLIC_HDL_URL || 'https://hdl.handle.net'
export const FDO_MANAGER_WEBUI_VERSION = version
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment