Skip to the content

Capsid menu

app/components/enhance.tsx

15 lines and 1 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.

Functions

The functions of enhance.tsx
FunctionLinesComplexityCoveredCRAPMutation
Enhance16 to 181No data: no coverage report in this mapNo data: no coverage report in this mapNo data: no mutants in this code

Imports

It imports no other module of this repo. Imported by app/components/ask-panel.tsx, app/components/dictionary-entry.tsx, app/components/home-podcast.tsx, app/components/phage-tool.tsx, app/components/procedure.tsx, app/components/search-trigger.tsx, app/components/site-header.tsx, app/components/theme-toggle.tsx, app/routes/blog.$slug.tsx, app/routes/cv.tsx, app/routes/home.tsx, app/routes/kb-library.tsx, app/routes/lab.kind.tsx, app/routes/lab.tsx, app/routes/phages.tsx, app/routes/procedure.tsx, app/routes/procedure.version.tsx, app/routes/protocols.tsx, app/routes/publications.tsx, app/routes/search.tsx, app/routes/systems.tsx.

Source

import { ENHANCE_URLS } from "virtual:enhance";

/*
 * How a public piece becomes interactive today, while public pages do not hydrate:
 * <Enhance module="plate" /> where the markup it enhances is rendered. The URLs come from the app
 * build, which bundles each `app/enhance/*.ts` in isolation and emits it as a self-contained asset
 * (scripts/lib/enhance-bundle.mjs).
 */
export { ENHANCE_URLS };

export type EnhanceModule = keyof typeof ENHANCE_URLS;

// A marker, not a script: a `<template>` is never fetched or run. The loader app/root.tsx renders
// at the end of <body> (app/lib/enhance-loader.mjs) inserts one module script per URL, which the
// policy allows as same-origin ('self'), so a cached page needs no nonce.
export function Enhance({ module }: { module: EnhanceModule }) {
  return <template data-enhance={ENHANCE_URLS[module]} />;
}