Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1077-support-folder-structure-for-non-multi-file #1269

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 8 additions & 22 deletions src/app/components/TokenSetSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ import Modal from './Modal';
import TokenSetTree from './TokenSetTree';
import Box from './Box';
import { styled } from '@/stitches.config';
import TokenSetList from './TokenSetList';
import {
editProhibitedSelector, tokensSelector,
} from '@/selectors';
import Stack from './Stack';
import { useIsGitMultiFileEnabled } from '../hooks/useIsGitMultiFileEnabled';

const StyledButton = styled('button', {
flexShrink: 0,
Expand All @@ -37,7 +35,6 @@ const StyledButton = styled('button', {
export default function TokenSetSelector({ saveScrollPositionSet } : { saveScrollPositionSet: (tokenSet: string) => void }) {
const tokens = useSelector(tokensSelector);
const editProhibited = useSelector(editProhibitedSelector);
const mfsEnabled = useIsGitMultiFileEnabled();
const dispatch = useDispatch<Dispatch>();
const { confirm } = useConfirm();

Expand Down Expand Up @@ -144,25 +141,14 @@ export default function TokenSetSelector({ saveScrollPositionSet } : { saveScrol
}}
className="content"
>
{mfsEnabled ? (
<TokenSetTree
tokenSets={allTokenSets}
onRename={handleRenameTokenSet}
onDelete={handleDelete}
onDuplicate={handleDuplicateTokenSet}
onReorder={handleReorder}
saveScrollPositionSet={saveScrollPositionSet}
/>
) : (
<TokenSetList
onReorder={handleReorder}
tokenSets={allTokenSets}
onRename={handleRenameTokenSet}
onDelete={handleDeleteTokenSet}
onDuplicate={handleDuplicateTokenSet}
saveScrollPositionSet={saveScrollPositionSet}
/>
)}
<TokenSetTree
tokenSets={allTokenSets}
onRename={handleRenameTokenSet}
onDelete={handleDelete}
onDuplicate={handleDuplicateTokenSet}
onReorder={handleReorder}
saveScrollPositionSet={saveScrollPositionSet}
/>
<Modal
isOpen={showRenameTokenSetFields}
close={handleCloseRenameModal}
Expand Down