0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00
logto/packages/experience/src/index.html
2024-07-08 16:52:15 +08:00

32 lines
906 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title></title>
<!-- Preload well-known APIs -->
<script>
const searchParams = new URLSearchParams(window.location.search);
const isPreview = searchParams.has('preview');
// Preview mode does not query phrases
const preLoadLinks = isPreview ? [] : ['/api/.well-known/phrases'];
preLoadLinks.forEach((linkUrl) => {
const link = document.createElement('link');
link.rel = 'preload';
link.href = linkUrl;
link.as = 'fetch';
link.crossOrigin = 'anonymous';
document.head.appendChild(link);
});
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app"></div>
<script type="module" src="index.tsx"></script>
</body>
</html>