Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
thsparks committed Mar 26, 2024
1 parent bf18f57 commit a97eace
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
13 changes: 7 additions & 6 deletions teachertool/src/components/BlockPickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ const BlockPickerCategory: React.FC<BlockPickerCategoryProps> = ({ category, onB
className={classList(css["category-block-list"], expanded ? css["expanded"] : css["collapsed"])}
>
{category.blocks.map(block => (
<PickBlockButton key={block.blockId} block={block} category={category} onBlockSelected={blockSelected} />
<PickBlockButton
key={block.blockId}
block={block}
category={category}
onBlockSelected={blockSelected}
/>
))}
</FocusList>
</div>
Expand Down Expand Up @@ -115,11 +120,7 @@ export const BlockPickerModal: React.FC<BlockPickerModalProps> = ({}) => {

function handleBlockSelected(block: pxt.editor.ToolboxBlockDefinition) {
if (blockPickerOptions) {
setParameterValue(
blockPickerOptions.criteriaInstanceId,
blockPickerOptions.paramName,
block.blockId
);
setParameterValue(blockPickerOptions.criteriaInstanceId, blockPickerOptions.paramName, block.blockId);
} else {
logError(ErrorCode.selectedBlockWithoutOptions, "Block selected without block picker options.");
}
Expand Down
2 changes: 1 addition & 1 deletion teachertool/src/components/DebouncedTextarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ export const DebouncedTextarea: React.FC<DebouncedTextareaProps> = ({ intervalMs
timerId.current = setTimeout(sendChange, intervalMs);
};

return <Textarea {...props} onChange={onChangeDebounce} />
return <Textarea {...props} onChange={onChangeDebounce} />;
};
2 changes: 1 addition & 1 deletion teachertool/src/transforms/loadToolboxCategoriesAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function loadToolboxCategoriesAsync() {

const [regularCategories, advancedCategories] = await Promise.all([
getToolboxCategoriesAsync(false),
getToolboxCategoriesAsync(true)
getToolboxCategoriesAsync(true),
]);
const categories = (regularCategories ?? []).concat(advancedCategories ?? []);
if (categories.length === 0) {
Expand Down
6 changes: 3 additions & 3 deletions teachertool/src/types/modalOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export interface ConfirmationModalOptions extends ModalOptions {
message: string;
onCancel: () => void;
onContinue: () => void;
};
}

export interface BlockPickerOptions extends ModalOptions{
export interface BlockPickerOptions extends ModalOptions {
modal: "block-picker";
criteriaInstanceId: string;
paramName: string;
};
}

0 comments on commit a97eace

Please sign in to comment.