Skip to content

Commit

Permalink
Merge pull request #918 from rust-lang/rtk-rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
shepmaster authored Mar 31, 2023
2 parents 3abdfa1 + 163b715 commit b64a8d4
Show file tree
Hide file tree
Showing 23 changed files with 518 additions and 438 deletions.
5 changes: 5 additions & 0 deletions ui/frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ module.exports = {
'PopButton.tsx',
'editor/AceEditor.tsx',
'editor/SimpleEditor.tsx',
'reducers/output/execute.ts',
'reducers/output/format.ts',
'reducers/output/gist.ts',
'reducers/websocket.ts',
'websocketActions.ts',
'websocketMiddleware.ts',
],
extends: ['prettier'],
Expand Down
5 changes: 5 additions & 0 deletions ui/frontend/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ node_modules
!PopButton.tsx
!editor/AceEditor.tsx
!editor/SimpleEditor.tsx
!reducers/output/execute.ts
!reducers/output/format.ts
!reducers/output/gist.ts
!reducers/websocket.ts
!websocketActions.ts
!websocketMiddleware.ts
3 changes: 2 additions & 1 deletion ui/frontend/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ToolsMenu from './ToolsMenu';
import * as actions from './actions';
import * as selectors from './selectors';
import { useAppDispatch } from './configureStore';
import { performGistSave } from './reducers/output/gist';

import styles from './Header.module.css';

Expand Down Expand Up @@ -132,7 +133,7 @@ const AdvancedOptionsMenuButton: React.FC = () => {

const ShareButton: React.FC = () => {
const dispatch = useAppDispatch();
const gistSave = useCallback(() => dispatch(actions.performGistSave()), [dispatch]);
const gistSave = useCallback(() => dispatch(performGistSave()), [dispatch]);

return (
<SegmentedButton title="Create shareable links to this code" onClick={gistSave}>
Expand Down
3 changes: 2 additions & 1 deletion ui/frontend/ToolsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import MenuAside from './MenuAside';
import * as selectors from './selectors';
import * as actions from './actions';
import { useAppDispatch } from './configureStore';
import { performFormat } from './reducers/output/format';

interface ToolsMenuProps {
close: () => void;
Expand All @@ -33,7 +34,7 @@ const ToolsMenu: React.FC<ToolsMenuProps> = props => {
props.close();
}, [dispatch, props]);
const format = useCallback(() => {
dispatch(actions.performFormat());
dispatch(performFormat());
props.close();
}, [dispatch, props]);
const expandMacros = useCallback(() => {
Expand Down
Loading

0 comments on commit b64a8d4

Please sign in to comment.