Skip to content

Commit

Permalink
Merge pull request #1132 from flerouwu/bugfix/doc-editor-font
Browse files Browse the repository at this point in the history
fix(web): documentation editor font not following preferences value
  • Loading branch information
helloanoop authored Dec 4, 2023
2 parents 11d0bc0 + 480f8cf commit 19efa2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/bruno-app/src/components/Documentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import get from 'lodash/get';
import { updateRequestDocs } from 'providers/ReduxStore/slices/collections';
import { useTheme } from 'providers/Theme/index';
import { useState } from 'react';
import { useDispatch } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux';
import { saveRequest } from 'providers/ReduxStore/slices/collections/actions';
import Markdown from 'components/MarkDown';
import CodeEditor from 'components/CodeEditor';
Expand All @@ -14,6 +14,7 @@ const Documentation = ({ item, collection }) => {
const { storedTheme } = useTheme();
const [isEditing, setIsEditing] = useState(false);
const docs = item.draft ? get(item, 'draft.request.docs') : get(item, 'request.docs');
const preferences = useSelector((state) => state.app.preferences);

const toggleViewMode = () => {
setIsEditing((prev) => !prev);
Expand Down Expand Up @@ -45,6 +46,7 @@ const Documentation = ({ item, collection }) => {
<CodeEditor
collection={collection}
theme={storedTheme}
font={get(preferences, 'font.codeFont', 'default')}
value={docs || ''}
onEdit={onEdit}
onSave={onSave}
Expand Down

0 comments on commit 19efa2f

Please sign in to comment.