From 1615819bce1c8dd676cd7edf36ce7671957414e5 Mon Sep 17 00:00:00 2001 From: Charlie Holtz Date: Mon, 12 Aug 2024 12:07:39 -0700 Subject: [PATCH] PR from melty/wider/bigger-diff-viewer (#49) * bot changes * bot changes * bot changes * bot changes * human changes * bot changes * bot changes * bot changes --- webview-ui/src/App.tsx | 8 ++++---- webview-ui/src/components/DiffViewer.tsx | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/webview-ui/src/App.tsx b/webview-ui/src/App.tsx index 7ac78bc0..098dcb48 100644 --- a/webview-ui/src/App.tsx +++ b/webview-ui/src/App.tsx @@ -46,11 +46,11 @@ function JouleComponent({ return (
-
+
{isPartial && }
-
+
{diffHtml && !isPartial && }
diff --git a/webview-ui/src/components/DiffViewer.tsx b/webview-ui/src/components/DiffViewer.tsx index 5b9fa775..4814245d 100644 --- a/webview-ui/src/components/DiffViewer.tsx +++ b/webview-ui/src/components/DiffViewer.tsx @@ -50,9 +50,7 @@ const dummyDiff = const Diff2HtmlComponent: React.FC = ({ diff }) => { const containerRef = useRef(null); - const [outputFormat, setOutputFormat] = useState<"unified" | "side-by-side">( - "side-by-side" - ); + const [outputFormat, setOutputFormat] = useState<"unified" | "side-by-side">("side-by-side"); useEffect(() => { if (containerRef.current) { @@ -79,8 +77,8 @@ const Diff2HtmlComponent: React.FC = ({ diff }) => { }, [diff, outputFormat]); return ( -
-
+
+
setOutputFormat( @@ -93,7 +91,7 @@ const Diff2HtmlComponent: React.FC = ({ diff }) => { Unified
-
+
); };