Skip to content

Commit

Permalink
fix docs-app compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya committed Jun 9, 2021
1 parent 217a824 commit c976a91
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/docs-app/src/common/filmSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ import {
areFilmsEqual,
createFilm,
filmSelectProps,
IFilm,
Film,
maybeAddCreatedFilmToArrays,
maybeDeleteCreatedFilmFromArrays,
renderCreateFilmOption,
TOP_100_FILMS,
} from "./films";

const FilmSelect = Select.ofType<IFilm>();
const FilmSelect = Select.ofType<Film>();

type Props = Omit<
SelectProps<IFilm>,
SelectProps<Film>,
| "createNewItemFromQuery"
| "createNewItemRenderer"
| "items"
Expand All @@ -51,9 +51,9 @@ export default function ({ allowCreate = false, ...restProps }: Props) {
const maybeCreateNewItemRenderer = allowCreate ? renderCreateFilmOption : null;

const [items, setItems] = React.useState(filmSelectProps.items);
const [createdItems, setCreatedItems] = React.useState<IFilm[]>([]);
const [createdItems, setCreatedItems] = React.useState<Film[]>([]);
const [film, setFilm] = React.useState(TOP_100_FILMS[0]);
const handleItemSelect = React.useCallback((newFilm: IFilm) => {
const handleItemSelect = React.useCallback((newFilm: Film) => {
// Delete the old film from the list if it was newly created.
const step1Result = maybeDeleteCreatedFilmFromArrays(items, createdItems, film);
// Add the new film to the list if it is newly created.
Expand Down
1 change: 0 additions & 1 deletion packages/docs-app/src/components/docsIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export class DocsIcon extends React.PureComponent<DocsIconProps> {
className={classNames("docs-icon", props.className)}
data-tags={tags}
onContextMenu={props.onContextMenu}
ref={props.ref}
value={iconName}
>
{props.popover}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import React from "react";
import { Button, Menu, MenuItem, Popover, Text, TextArea } from "@blueprintjs/core";
import { Example, handleStringChange, ExampleProps } from "@blueprintjs/docs-theme";

import { Film, TOP_100_FILMS } from "../select-examples/films";
import { Film, TOP_100_FILMS } from "../../common/films";

export interface TextExampleState {
textContent: string;
Expand Down

0 comments on commit c976a91

Please sign in to comment.