From 27ddda22a5517ec4d1aa6745e024f1eb545fab2d Mon Sep 17 00:00:00 2001 From: Ivan Starkov Date: Wed, 14 Jun 2023 23:58:45 +0300 Subject: [PATCH] Fix hydration error (#1795) ## Description Fixes this on each start ``` react_devtools_backend_compact.js:2367 Warning: Prop `className` did not match. Server: "c-dKXKjp c-gcikI language-css" Client: "c-dKXKjp c-gcikI" at pre at div at div ``` Looks like a bug with pre and code element combination in react hydration ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory --- .../builder/features/sidebar-left/navigator/css-preview.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/builder/app/builder/features/sidebar-left/navigator/css-preview.tsx b/apps/builder/app/builder/features/sidebar-left/navigator/css-preview.tsx index 8be75183a7..37144e6daf 100644 --- a/apps/builder/app/builder/features/sidebar-left/navigator/css-preview.tsx +++ b/apps/builder/app/builder/features/sidebar-left/navigator/css-preview.tsx @@ -73,11 +73,11 @@ export const CssPreview = () => {
-          
+          >