@@ -5,7 +5,7 @@ import { ApiHelper, ErrorMessages, PageHeader, SmallButton, UserHelper } from "@
55import { useWindowWidth } from "@react-hook/window-size" ;
66import { Navigate , useNavigate } from "react-router-dom" ;
77import { AddPageModal , NavLinkEdit } from "./components" ;
8- import { PageHelper } from "../helpers" ;
8+ import { PageHelper , EnvironmentHelper } from "../helpers" ;
99import type { PageLink } from "../helpers" ;
1010import type { GenericSettingInterface , LinkInterface } from "@churchapps/helpers" ;
1111import { DndProvider } from "react-dnd" ;
@@ -48,10 +48,10 @@ export const PagesPage = () => {
4848 < TableCell >
4949 < Stack direction = "row" alignItems = "center" spacing = { 1 } >
5050 { getExpandControl ( item , level ) }
51- < Typography variant = "body2" sx = { { fontFamily : 'monospace' , cursor : 'pointer' , color : 'primary.main' , '&:hover' : { textDecoration : 'underline' } } } onClick = { ( ) => navigate ( `/preview/ ${ UserHelper . currentUserChurch . church . id } ${ item . url } ` ) } >
51+ < Typography variant = "body2" sx = { { fontFamily : 'monospace' , cursor : 'pointer' , color : 'primary.main' , '&:hover' : { textDecoration : 'underline' } } } onClick = { ( ) => window . open ( EnvironmentHelper . B1Url . replace ( '{subdomain}' , UserHelper . currentUserChurch . church . subDomain ) + item . url , '_blank' ) } >
5252 { item . url }
5353 </ Typography >
54- < Tooltip title = "Preview page" > < IconButton size = "small" onClick = { ( ) => navigate ( `/preview/ ${ UserHelper . currentUserChurch . church . id } ${ item . url } ` ) } sx = { { p : 0.5 } } > < VisibilityIcon sx = { { fontSize : 16 } } /> </ IconButton > </ Tooltip >
54+ < Tooltip title = "Preview page" > < IconButton size = "small" onClick = { ( ) => window . open ( EnvironmentHelper . B1Url . replace ( '{subdomain}' , UserHelper . currentUserChurch . church . subDomain ) + item . url , '_blank' ) } sx = { { p : 0.5 } } > < VisibilityIcon sx = { { fontSize : 16 } } /> </ IconButton > </ Tooltip >
5555 { ! item . custom && ( < Chip label = "Generated" size = "small" color = "default" sx = { { fontSize : '0.7rem' , height : 18 } } /> ) }
5656 </ Stack >
5757 </ TableCell >
0 commit comments