Skip to content

Commit

Permalink
fix: handle shorted framework name from query
Browse files Browse the repository at this point in the history
  • Loading branch information
softmarshmallow committed Apr 11, 2022
1 parent 1a96a48 commit 42633ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import React, { useEffect } from "react";
import { IField, LanguageType, Option } from "@code-ui/docstring/dist/lib/type";
import { Docstring as DocstringView } from "@code-ui/docstring";
import {
Expand Down Expand Up @@ -32,13 +32,13 @@ export function CodeOptionsControl(props: CodeOptionsControlProps) {
all_preset_options_map__prod[__presetname]
);

assert(useroption, "option must be specified");

useEffect(() => {
// trigger initial value
props.onUseroptionChange(useroption);
}, []);

assert(useroption, "option must be specified");

// FIXME: this should be fixed on https://github.com/gridaco/code-like-ui (view CURSOR)
const __dirty_sort_framework = (): Option<string>[] => {
const presets = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ export const all_preset_options__prod = [

export const all_preset_options_map__prod = {
none: null,
flutter: flutter_presets.flutter_default,
flutter_default: flutter_presets.flutter_default,
react: react_presets.react_default,
react_default: react_presets.react_default,
react_with_styled_components: react_presets.react_with_styled_components,
react_with_inline_css: react_presets.react_with_inline_css,
Expand Down

1 comment on commit 42633ce

@vercel
Copy link

@vercel vercel bot commented on 42633ce Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.