mirror of
https://github.com/outline/outline.git
synced 2026-11-29 00:29:36 +03:00
* React 18 upgrade * fix: Force synchronous React rendering in server HTML export React 18 can defer a legacy ReactDOM.render commit when sync work is queued, leaving exported component nodes empty. Wrap the render in flushSync, and flush unmount-scheduled passive effects before global env cleanup so React never runs without a window. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor: Move server ComponentView to createRoot ReactDOM.render and unmountComponentAtNode are removed in React 19. flushSync around root.render keeps the mount synchronous for the HTML-export path, which reads the DOM immediately after. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Enable CI --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
26 lines
503 B
TypeScript
26 lines
503 B
TypeScript
import * as React from "react";
|
|
|
|
type Props = {
|
|
href: string;
|
|
};
|
|
|
|
const style: React.CSSProperties = {
|
|
display: "inline-block",
|
|
padding: "10px 20px",
|
|
color: "#FFFFFF",
|
|
background: "#000000",
|
|
border: "1px solid #000",
|
|
borderRadius: "4px",
|
|
fontWeight: 500,
|
|
textDecoration: "none",
|
|
cursor: "pointer",
|
|
};
|
|
|
|
const Button: React.FC<React.PropsWithChildren<Props>> = (props) => (
|
|
<a {...props} style={style} className="email-button">
|
|
{props.children}
|
|
</a>
|
|
);
|
|
|
|
export default Button;
|