asset path correction
This commit is contained in:
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>CITPL Admin</title>
|
<title>CITPL Admin</title>
|
||||||
<script type="module" crossorigin src="/citpl_website/assets/admin-Co5z_WIK.js"></script>
|
<script type="module" crossorigin src="/citpl_website/assets/admin-DvMtF9a9.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-Dfk9cXvs.js">
|
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-Dfk9cXvs.js">
|
||||||
<link rel="stylesheet" crossorigin href="/citpl_website/assets/admin-Chd5uVZT.css">
|
<link rel="stylesheet" crossorigin href="/citpl_website/assets/admin-Chd5uVZT.css">
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{c as e,l as t,p as n,s as r}from"./x-Dfk9cXvs.js";import{r as i,t as a}from"./App-C982NuSA.js";var o=n(t(),1),s=e(),c=r();(0,s.createRoot)(document.getElementById(`root`)).render((0,c.jsx)(o.StrictMode,{children:(0,c.jsx)(i,{children:(0,c.jsx)(a,{})})}));
|
import{c as e,l as t,p as n,s as r}from"./x-Dfk9cXvs.js";import{r as i,t as a}from"./App-DyKpc_Hi.js";var o=n(t(),1),s=e(),c=r();(0,s.createRoot)(document.getElementById(`root`)).render((0,c.jsx)(o.StrictMode,{children:(0,c.jsx)(i,{children:(0,c.jsx)(a,{})})}));
|
||||||
@@ -1 +1 @@
|
|||||||
import{c as e,l as t,p as n,s as r}from"./x-Dfk9cXvs.js";import{n as i,r as a,t as o}from"./App-C982NuSA.js";var s=n(t(),1),c=e(),l=r();function u(){return(0,s.useEffect)(()=>(document.body.classList.add(`admin-preview-embed`),()=>document.body.classList.remove(`admin-preview-embed`)),[]),(0,l.jsx)(o,{previewMode:!0})}(0,c.createRoot)(document.getElementById(`root`)).render((0,l.jsx)(s.StrictMode,{children:(0,l.jsx)(i.Provider,{value:!0,children:(0,l.jsx)(a,{previewMode:!0,children:(0,l.jsx)(u,{})})})}));
|
import{c as e,l as t,p as n,s as r}from"./x-Dfk9cXvs.js";import{n as i,r as a,t as o}from"./App-DyKpc_Hi.js";var s=n(t(),1),c=e(),l=r();function u(){return(0,s.useEffect)(()=>(document.body.classList.add(`admin-preview-embed`),()=>document.body.classList.remove(`admin-preview-embed`)),[]),(0,l.jsx)(o,{previewMode:!0})}(0,c.createRoot)(document.getElementById(`root`)).render((0,l.jsx)(s.StrictMode,{children:(0,l.jsx)(i.Provider,{value:!0,children:(0,l.jsx)(a,{previewMode:!0,children:(0,l.jsx)(u,{})})})}));
|
||||||
Vendored
+3
-3
@@ -2,12 +2,12 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/citpl_website/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Cavin Infotech | One Trusted Technology Partner</title>
|
<title>Cavin Infotech | One Trusted Technology Partner</title>
|
||||||
<script type="module" crossorigin src="/citpl_website/assets/main-BcSDaG1F.js"></script>
|
<script type="module" crossorigin src="/citpl_website/assets/main-DHNPwmMh.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-Dfk9cXvs.js">
|
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-Dfk9cXvs.js">
|
||||||
<link rel="modulepreload" crossorigin href="/citpl_website/assets/App-C982NuSA.js">
|
<link rel="modulepreload" crossorigin href="/citpl_website/assets/App-DyKpc_Hi.js">
|
||||||
<link rel="stylesheet" crossorigin href="/citpl_website/assets/App-DpUt8oMg.css">
|
<link rel="stylesheet" crossorigin href="/citpl_website/assets/App-DpUt8oMg.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Vendored
+2
-2
@@ -4,9 +4,9 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>CITPL Preview</title>
|
<title>CITPL Preview</title>
|
||||||
<script type="module" crossorigin src="/citpl_website/assets/preview-BnPcpP8v.js"></script>
|
<script type="module" crossorigin src="/citpl_website/assets/preview-1GetNl6-.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-Dfk9cXvs.js">
|
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-Dfk9cXvs.js">
|
||||||
<link rel="modulepreload" crossorigin href="/citpl_website/assets/App-C982NuSA.js">
|
<link rel="modulepreload" crossorigin href="/citpl_website/assets/App-DyKpc_Hi.js">
|
||||||
<link rel="stylesheet" crossorigin href="/citpl_website/assets/App-DpUt8oMg.css">
|
<link rel="stylesheet" crossorigin href="/citpl_website/assets/App-DpUt8oMg.css">
|
||||||
<link rel="stylesheet" crossorigin href="/citpl_website/assets/preview-DknkzKsF.css">
|
<link rel="stylesheet" crossorigin href="/citpl_website/assets/preview-DknkzKsF.css">
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/citpl_website/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Cavin Infotech | One Trusted Technology Partner</title>
|
<title>Cavin Infotech | One Trusted Technology Partner</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
+21
-19
@@ -1,4 +1,6 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef } from 'react';
|
||||||
|
|
||||||
|
const BASE = import.meta.env.BASE_URL;
|
||||||
import { motion, useScroll, useTransform, useMotionValueEvent, useReducedMotion } from 'framer-motion';
|
import { motion, useScroll, useTransform, useMotionValueEvent, useReducedMotion } from 'framer-motion';
|
||||||
import { useContent } from './context/ContentContext';
|
import { useContent } from './context/ContentContext';
|
||||||
import { usePreviewMode } from './context/PreviewContext';
|
import { usePreviewMode } from './context/PreviewContext';
|
||||||
@@ -564,7 +566,7 @@ export default function App({ previewMode = false }) {
|
|||||||
borderBottom: activeSection === 'products' ? '1px solid rgba(15, 23, 42, 0.08)' : '1px solid rgba(255, 255, 255, 0.05)'
|
borderBottom: activeSection === 'products' ? '1px solid rgba(15, 23, 42, 0.08)' : '1px solid rgba(255, 255, 255, 0.05)'
|
||||||
}}>
|
}}>
|
||||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||||
<img src="/assets/cavin_logo.svg" alt="Cavin Infotech Logo" style={{ height: isMobile ? '38px' : '50px', display: 'block' }} />
|
<img src={`${BASE}assets/cavin_logo.svg`} alt="Cavin Infotech Logo" style={{ height: isMobile ? '38px' : '50px', display: 'block' }} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!isMobile && (
|
{!isMobile && (
|
||||||
@@ -606,7 +608,7 @@ export default function App({ previewMode = false }) {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
<div className="btn-sparkle-wrapper">
|
<div className="btn-sparkle-wrapper">
|
||||||
<img src="/assets/button_hover_effect.png" className="btn-sparkles" alt="" />
|
<img src={`${BASE}assets/button_hover_effect.png`} className="btn-sparkles" alt="" />
|
||||||
<button className="btn-talk" onClick={() => setIsStrategyOpen(true)}>
|
<button className="btn-talk" onClick={() => setIsStrategyOpen(true)}>
|
||||||
Book a Strategy Call
|
Book a Strategy Call
|
||||||
</button>
|
</button>
|
||||||
@@ -935,7 +937,7 @@ export default function App({ previewMode = false }) {
|
|||||||
{/* Globe Visual */}
|
{/* Globe Visual */}
|
||||||
<div style={{ position: 'relative', width: '280px', height: '280px', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
|
<div style={{ position: 'relative', width: '280px', height: '280px', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
|
||||||
<img
|
<img
|
||||||
src="/assets/GlobeVector.svg"
|
src={`${BASE}assets/GlobeVector.svg`}
|
||||||
alt="Globe Map"
|
alt="Globe Map"
|
||||||
style={{ width: '100%', height: '100%', objectFit: 'contain', opacity: 0.3 }}
|
style={{ width: '100%', height: '100%', objectFit: 'contain', opacity: 0.3 }}
|
||||||
/>
|
/>
|
||||||
@@ -980,7 +982,7 @@ export default function App({ previewMode = false }) {
|
|||||||
|
|
||||||
{/* Globe in background - Increased Size & Brightness */}
|
{/* Globe in background - Increased Size & Brightness */}
|
||||||
<img
|
<img
|
||||||
src="/assets/GlobeVector.svg"
|
src={`${BASE}assets/GlobeVector.svg`}
|
||||||
alt="Globe Map"
|
alt="Globe Map"
|
||||||
style={{
|
style={{
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
@@ -1043,18 +1045,18 @@ export default function App({ previewMode = false }) {
|
|||||||
|
|
||||||
{/* orbital logos with smooth continuous motion in horizontally elongated oval paths - No Skewing */}
|
{/* orbital logos with smooth continuous motion in horizontally elongated oval paths - No Skewing */}
|
||||||
{/* Outer Orbit - Increased size further to radiusX=520, radiusY=320 */}
|
{/* Outer Orbit - Increased size further to radiusX=520, radiusY=320 */}
|
||||||
<OrbitalLogo src="/assets/Frame 33.svg" alt="MRF Logo" radiusX={520} radiusY={320} startAngle={0} duration={60} clockwise={true} size={170} />
|
<OrbitalLogo src={`${BASE}assets/Frame 33.svg`} alt="MRF Logo" radiusX={520} radiusY={320} startAngle={0} duration={60} clockwise={true} size={170} />
|
||||||
<OrbitalLogo src="/assets/Frame 31.svg" alt="ACA Global Logo" radiusX={520} radiusY={320} startAngle={78} duration={60} clockwise={true} size={175} />
|
<OrbitalLogo src={`${BASE}assets/Frame 31.svg`} alt="ACA Global Logo" radiusX={520} radiusY={320} startAngle={78} duration={60} clockwise={true} size={175} />
|
||||||
<OrbitalLogo src="/assets/Frame 30.svg" alt="Polyhose Logo" radiusX={520} radiusY={320} startAngle={144} duration={60} clockwise={true} size={170} />
|
<OrbitalLogo src={`${BASE}assets/Frame 30.svg`} alt="Polyhose Logo" radiusX={520} radiusY={320} startAngle={144} duration={60} clockwise={true} size={170} />
|
||||||
<OrbitalLogo src="/assets/Frame 32.svg" alt="Dawn Pictures Logo" radiusX={520} radiusY={320} startAngle={216} duration={60} clockwise={true} size={180} />
|
<OrbitalLogo src={`${BASE}assets/Frame 32.svg`} alt="Dawn Pictures Logo" radiusX={520} radiusY={320} startAngle={216} duration={60} clockwise={true} size={180} />
|
||||||
<OrbitalLogo src="/assets/Frame 35.svg" alt="Hero Logo" radiusX={520} radiusY={320} startAngle={282} duration={60} clockwise={true} size={170} />
|
<OrbitalLogo src={`${BASE}assets/Frame 35.svg`} alt="Hero Logo" radiusX={520} radiusY={320} startAngle={282} duration={60} clockwise={true} size={170} />
|
||||||
|
|
||||||
{/* Inner Orbit - Adjusted size to radiusX=360, radiusY=225 */}
|
{/* Inner Orbit - Adjusted size to radiusX=360, radiusY=225 */}
|
||||||
<OrbitalLogo src="/assets/Frame 28.svg" alt="Valeo Logo" radiusX={360} radiusY={225} startAngle={36} duration={40} clockwise={false} size={170} />
|
<OrbitalLogo src={`${BASE}assets/Frame 28.svg`} alt="Valeo Logo" radiusX={360} radiusY={225} startAngle={36} duration={40} clockwise={false} size={170} />
|
||||||
<OrbitalLogo src="/assets/Frame 36.svg" alt="BorgWarner Logo" radiusX={360} radiusY={225} startAngle={108} duration={40} clockwise={false} size={170} />
|
<OrbitalLogo src={`${BASE}assets/Frame 36.svg`} alt="BorgWarner Logo" radiusX={360} radiusY={225} startAngle={108} duration={40} clockwise={false} size={170} />
|
||||||
<OrbitalLogo src="/assets/kone.png" alt="KONE Logo" radiusX={360} radiusY={225} startAngle={180} duration={40} clockwise={false} size={160} />
|
<OrbitalLogo src={`${BASE}assets/kone.png`} alt="KONE Logo" radiusX={360} radiusY={225} startAngle={180} duration={40} clockwise={false} size={160} />
|
||||||
<OrbitalLogo src="/assets/Frame 34.svg" alt="Chola MS Logo" radiusX={360} radiusY={225} startAngle={252} duration={40} clockwise={false} size={170} />
|
<OrbitalLogo src={`${BASE}assets/Frame 34.svg`} alt="Chola MS Logo" radiusX={360} radiusY={225} startAngle={252} duration={40} clockwise={false} size={170} />
|
||||||
<OrbitalLogo src="/assets/Frame 27.svg" alt="CavinKare Logo" radiusX={360} radiusY={225} startAngle={324} duration={40} clockwise={false} size={180} />
|
<OrbitalLogo src={`${BASE}assets/Frame 27.svg`} alt="CavinKare Logo" radiusX={360} radiusY={225} startAngle={324} duration={40} clockwise={false} size={180} />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -1367,7 +1369,7 @@ export default function App({ previewMode = false }) {
|
|||||||
<div className="glass-card" style={{
|
<div className="glass-card" style={{
|
||||||
padding: '2rem 1.8rem',
|
padding: '2rem 1.8rem',
|
||||||
borderRadius: '20px',
|
borderRadius: '20px',
|
||||||
background: 'linear-gradient(to bottom, rgba(2, 7, 16, 0.95) 0%, rgba(2, 7, 16, 0.6) 45%, rgba(2, 7, 16, 0) 85%), url(/assets/whyus_hologram.jpg)',
|
background: `linear-gradient(to bottom, rgba(2, 7, 16, 0.95) 0%, rgba(2, 7, 16, 0.6) 45%, rgba(2, 7, 16, 0) 85%), url(${BASE}assets/whyus_hologram.jpg)`,
|
||||||
backgroundSize: 'cover',
|
backgroundSize: 'cover',
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
border: '1px solid rgba(255, 255, 255, 0.06)',
|
border: '1px solid rgba(255, 255, 255, 0.06)',
|
||||||
@@ -1429,7 +1431,7 @@ export default function App({ previewMode = false }) {
|
|||||||
height: '100%'
|
height: '100%'
|
||||||
}}>
|
}}>
|
||||||
<img
|
<img
|
||||||
src="/assets/whyus_arab_meeting.jpg"
|
src={`${BASE}assets/whyus_arab_meeting.jpg`}
|
||||||
alt="Corporate collaboration"
|
alt="Corporate collaboration"
|
||||||
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||||
/>
|
/>
|
||||||
@@ -1499,7 +1501,7 @@ export default function App({ previewMode = false }) {
|
|||||||
height: '100%'
|
height: '100%'
|
||||||
}}>
|
}}>
|
||||||
<img
|
<img
|
||||||
src="/assets/whyus_vr_man.jpg"
|
src={`${BASE}assets/whyus_vr_man.jpg`}
|
||||||
alt="Sunset boardroom"
|
alt="Sunset boardroom"
|
||||||
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||||
/>
|
/>
|
||||||
@@ -1513,7 +1515,7 @@ export default function App({ previewMode = false }) {
|
|||||||
border: '1px solid rgba(255, 255, 255, 0.06)',
|
border: '1px solid rgba(255, 255, 255, 0.06)',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
backgroundImage: 'linear-gradient(to bottom, rgba(2, 7, 16, 0.95) 0%, rgba(2, 7, 16, 0.6) 45%, rgba(2, 7, 16, 0) 85%), url(/assets/whyus_hologram.jpg)',
|
backgroundImage: `linear-gradient(to bottom, rgba(2, 7, 16, 0.95) 0%, rgba(2, 7, 16, 0.6) 45%, rgba(2, 7, 16, 0) 85%), url(${BASE}assets/whyus_hologram.jpg)`,
|
||||||
backgroundSize: 'cover',
|
backgroundSize: 'cover',
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@@ -1773,7 +1775,7 @@ export default function App({ previewMode = false }) {
|
|||||||
padding: '4rem 0 0 0',
|
padding: '4rem 0 0 0',
|
||||||
}}>
|
}}>
|
||||||
<img
|
<img
|
||||||
src="/assets/citp_footer_design.png"
|
src={`${BASE}assets/citp_footer_design.png`}
|
||||||
alt="Cavin Infotech Logo Divider"
|
alt="Cavin Infotech Logo Divider"
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
|||||||
+4
-2
@@ -1,4 +1,6 @@
|
|||||||
import { useEffect, useRef, useState, Component } from 'react';
|
import { useEffect, useRef, useState, Component } from 'react';
|
||||||
|
|
||||||
|
const BASE = import.meta.env.BASE_URL;
|
||||||
import {
|
import {
|
||||||
LayoutDashboard,
|
LayoutDashboard,
|
||||||
Sparkles,
|
Sparkles,
|
||||||
@@ -93,7 +95,7 @@ function LoginPreview() {
|
|||||||
return (
|
return (
|
||||||
<div className="login-preview">
|
<div className="login-preview">
|
||||||
<div className="login-preview-intro">
|
<div className="login-preview-intro">
|
||||||
<img src="/assets/cavin_logo.svg" alt="Cavin Infotech" />
|
<img src={`${BASE}assets/cavin_logo.svg`} alt="Cavin Infotech" />
|
||||||
<div>
|
<div>
|
||||||
<h1>Content <span>Manager</span></h1>
|
<h1>Content <span>Manager</span></h1>
|
||||||
<p>Preview the live website before you sign in. Edits publish instantly after login.</p>
|
<p>Preview the live website before you sign in. Edits publish instantly after login.</p>
|
||||||
@@ -501,7 +503,7 @@ export default function App() {
|
|||||||
|
|
||||||
<aside className={`admin-sidebar ${sidebarOpen ? 'open' : ''}`}>
|
<aside className={`admin-sidebar ${sidebarOpen ? 'open' : ''}`}>
|
||||||
<div className="admin-sidebar-brand">
|
<div className="admin-sidebar-brand">
|
||||||
<img src="/assets/cavin_logo.svg" alt="Cavin Infotech" />
|
<img src={`${BASE}assets/cavin_logo.svg`} alt="Cavin Infotech" />
|
||||||
<h2>Content Manager</h2>
|
<h2>Content Manager</h2>
|
||||||
<p>Cavin Infotech Website</p>
|
<p>Cavin Infotech Website</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,9 +4,24 @@ import defaultContent from '../../server/seed/default-content.json';
|
|||||||
const ContentContext = createContext(null);
|
const ContentContext = createContext(null);
|
||||||
|
|
||||||
const API_BASE = import.meta.env.VITE_API_URL || '';
|
const API_BASE = import.meta.env.VITE_API_URL || '';
|
||||||
|
const BASE = import.meta.env.BASE_URL;
|
||||||
|
|
||||||
|
// Recursively prefix /assets/ paths with the Vite base URL
|
||||||
|
function prefixAssets(obj) {
|
||||||
|
if (typeof obj === 'string') {
|
||||||
|
return obj.startsWith('/assets/') ? `${BASE}${obj.slice(1)}` : obj;
|
||||||
|
}
|
||||||
|
if (Array.isArray(obj)) return obj.map(prefixAssets);
|
||||||
|
if (obj && typeof obj === 'object') {
|
||||||
|
const out = {};
|
||||||
|
for (const k in obj) out[k] = prefixAssets(obj[k]);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
export function ContentProvider({ children, previewMode = false }) {
|
export function ContentProvider({ children, previewMode = false }) {
|
||||||
const [content, setContent] = useState(defaultContent);
|
const [content, setContent] = useState(prefixAssets(defaultContent));
|
||||||
const [loading, setLoading] = useState(!previewMode);
|
const [loading, setLoading] = useState(!previewMode);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
const [updatedAt, setUpdatedAt] = useState(null);
|
const [updatedAt, setUpdatedAt] = useState(null);
|
||||||
@@ -21,7 +36,7 @@ export function ContentProvider({ children, previewMode = false }) {
|
|||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
const { _updatedAt, ...rest } = data;
|
const { _updatedAt, ...rest } = data;
|
||||||
setContent(rest);
|
setContent(prefixAssets(rest));
|
||||||
setUpdatedAt(_updatedAt);
|
setUpdatedAt(_updatedAt);
|
||||||
setError(null);
|
setError(null);
|
||||||
})
|
})
|
||||||
@@ -41,7 +56,7 @@ export function ContentProvider({ children, previewMode = false }) {
|
|||||||
if (event.origin !== window.location.origin) return;
|
if (event.origin !== window.location.origin) return;
|
||||||
if (event.data?.type !== 'ADMIN_PREVIEW' || !event.data.fullContent) return;
|
if (event.data?.type !== 'ADMIN_PREVIEW' || !event.data.fullContent) return;
|
||||||
|
|
||||||
setContent(event.data.fullContent);
|
setContent(prefixAssets(event.data.fullContent));
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|
||||||
const anchor = event.data.anchor;
|
const anchor = event.data.anchor;
|
||||||
|
|||||||
Reference in New Issue
Block a user