Skip to content

Commit

Permalink
Merge pull request #123 from dolthub/taylor/rc
Browse files Browse the repository at this point in the history
web: Use @dolthub/react-components
  • Loading branch information
tbantle22 authored Feb 15, 2024
2 parents 51f0eca + c297d49 commit d055bad
Show file tree
Hide file tree
Showing 71 changed files with 90 additions and 255 deletions.
3 changes: 1 addition & 2 deletions web/components/ButtonWithPopup/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Popup from "@components/Popup";
import { Popup, PopupProps } from "@dolthub/react-components";
import { FaCaretDown } from "@react-icons/all-files/fa/FaCaretDown";
import { FaCaretUp } from "@react-icons/all-files/fa/FaCaretUp";
import cx from "classnames";
import { ReactNode } from "react";
import { PopupProps } from "reactjs-popup/dist/types";
import css from "./index.module.css";

type Props = Partial<PopupProps> & {
Expand Down
2 changes: 1 addition & 1 deletion web/components/CellButtons/HistoryButton.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Button from "@components/Button";
import Loader from "@components/Loader";
import useViewList from "@components/Views/useViewList";
import { useDataTableContext } from "@contexts/dataTable";
import { useSqlEditorContext } from "@contexts/sqleditor";
import { Loader } from "@dolthub/react-components";
import {
ColumnForDataTableFragment,
RowForDataTableFragment,
Expand Down
2 changes: 1 addition & 1 deletion web/components/CommitGraph/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Database404Inner } from "@components/Database404";
import Loader from "@components/Loader";
import Page404 from "@components/Page404";
import { Loader } from "@dolthub/react-components";
import { useCommitListForCommitGraph } from "@hooks/useCommitListForCommitGraph";
import { gqlDepNotFound } from "@lib/errors/graphql";
import { errorMatches } from "@lib/errors/helpers";
Expand Down
2 changes: 1 addition & 1 deletion web/components/CreateDatabase/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Button from "@components/Button";
import Loader from "@components/Loader";
import Modal from "@components/Modal";
import { Loader } from "@dolthub/react-components";
import {
DatabasesDocument,
useCreateDatabaseMutation,
Expand Down
2 changes: 1 addition & 1 deletion web/components/CreateSchema/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Button from "@components/Button";
import Loader from "@components/Loader";
import Modal from "@components/Modal";
import { Loader } from "@dolthub/react-components";
import { DatabasesDocument, useCreateSchemaMutation } from "@gen/graphql-types";
import useMutation from "@hooks/useMutation";
import { database } from "@lib/urls";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DataTable/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApolloError } from "@apollo/client";
import ErrorMsg from "@components/ErrorMsg";
import Loader from "@components/Loader";
import { useDataTableContext } from "@contexts/dataTable";
import { Loader } from "@dolthub/react-components";
import { Maybe } from "@dolthub/web-utils";
import {
ColumnForDataTableFragment,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import SmallLoader from "@components/SmallLoader";
import { SmallLoader } from "@dolthub/react-components";
import { useDocsRowsForDocPageQuery } from "@gen/graphql-types";
import { RefParams } from "@lib/params";
import { newDoc } from "@lib/urls";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Popup from "@components/Popup";
import NotDoltWrapper from "@components/util/NotDoltWrapper";
import { Popup } from "@dolthub/react-components";
import useRole from "@hooks/useRole";
import { DatabaseParams } from "@lib/params";
import { newRelease, upload } from "@lib/urls";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Button from "@components/Button";
import ErrorMsg from "@components/ErrorMsg";
import Modal from "@components/Modal";
import SmallLoader from "@components/SmallLoader";
import Tooltip from "@components/Tooltip";
import { SmallLoader } from "@dolthub/react-components";
import { useResetDatabaseMutation } from "@gen/graphql-types";
import useMutation from "@hooks/useMutation";
import { IoReloadSharp } from "@react-icons/all-files/io5/IoReloadSharp";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DatabaseNav/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SmallLoader from "@components/SmallLoader";
import Tooltip from "@components/Tooltip";
import NotDoltWrapper from "@components/util/NotDoltWrapper";
import { SmallLoader } from "@dolthub/react-components";
import { useGetBranchQuery, useGetTagQuery } from "@gen/graphql-types";
import useDatabaseDetails from "@hooks/useDatabaseDetails";
import useDefaultBranch from "@hooks/useDefaultBranch";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DatabaseOptionsDropdown/CsvModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Button from "@components/Button";
import ErrorMsg from "@components/ErrorMsg";
import FormInput from "@components/FormInput";
import SmallLoader from "@components/SmallLoader";
import { SmallLoader } from "@dolthub/react-components";
import { useSqlSelectForCsvDownloadQuery } from "@gen/graphql-types";
import { isTimeoutError } from "@lib/errors/helpers";
import { ModalProps } from "@lib/modalProps";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DatabaseOptionsDropdown/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Btn from "@components/Btn";
import Popup from "@components/Popup";
import { Popup } from "@dolthub/react-components";
import { useEffectOnMount } from "@dolthub/react-hooks";
import { fakeEscapePress } from "@dolthub/web-utils";
import useSqlParser from "@hooks/useSqlParser";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Button from "@components/Button";
import ButtonsWithError from "@components/ButtonsWithError";
import FormInput from "@components/FormInput";
import Loader from "@components/Loader";
import Modal from "@components/Modal";
import DocsLink from "@components/links/DocsLink";
import { useSqlEditorContext } from "@contexts/sqleditor";
import { Loader } from "@dolthub/react-components";
import useSqlBuilder from "@hooks/useSqlBuilder";
import { ModalProps } from "@lib/modalProps";
import { DatabaseParams } from "@lib/params";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Btn from "@components/Btn";
import Loader from "@components/Loader";
import MobileSqlViewer from "@components/SqlEditor/MobileSqlViewer";
import { useSqlEditorContext } from "@contexts/sqleditor";
import { Loader } from "@dolthub/react-components";
import { FaChevronDown } from "@react-icons/all-files/fa/FaChevronDown";
import { FaChevronUp } from "@react-icons/all-files/fa/FaChevronUp";
import Errors from "../Errors";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DatabaseTableHeader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Btn from "@components/Btn";
import Loader from "@components/Loader";
import SqlEditor from "@components/SqlEditor";
import { useSqlEditorContext } from "@contexts/sqleditor";
import { Loader } from "@dolthub/react-components";
import { BiPencil } from "@react-icons/all-files/bi/BiPencil";
import dynamic from "next/dynamic";
import Buttons from "./Buttons";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DatabaseTypeLabel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Loader from "@components/Loader";
import { Loader } from "@dolthub/react-components";
import { DatabaseType, useDoltDatabaseDetailsQuery } from "@gen/graphql-types";
import cx from "classnames";
import css from "./index.module.css";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DeleteModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { MutationHookOptions, MutationTuple } from "@apollo/client";
import Button from "@components/Button";
import ButtonsWithError from "@components/ButtonsWithError";
import Loader from "@components/Loader";
import Modal from "@components/Modal";
import { Loader } from "@dolthub/react-components";
import useMutation from "@hooks/useMutation";
import { RefetchQueries } from "@lib/refetchQueries";
import { ReactNode } from "react";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DiffStat/SummaryStats.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApolloError } from "@apollo/client";
import SmallLoader from "@components/SmallLoader";
import { SmallLoader } from "@dolthub/react-components";
import { DiffStatForDiffsFragment } from "@gen/graphql-types";
import cx from "classnames";
import SummaryStat from "./SummaryStat";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DiffTable/DataDiff/ViewSqlLink.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DropdownItem } from "@components/DatabaseOptionsDropdown";
import SmallLoader from "@components/SmallLoader";
import Link from "@components/links/Link";
import { SmallLoader } from "@dolthub/react-components";
import {
ColumnForDataTableFragment,
CommitDiffType,
Expand Down
2 changes: 1 addition & 1 deletion web/components/DiffTable/DataDiff/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import Button from "@components/Button";
import DatabaseOptionsDropdown from "@components/DatabaseOptionsDropdown";
import Errors from "@components/DatabaseTableHeader/Errors";
import ErrorMsg from "@components/ErrorMsg";
import Loader from "@components/Loader";
import { useDataTableContext } from "@contexts/dataTable";
import { useDiffContext } from "@contexts/diff";
import { Loader } from "@dolthub/react-components";
import { useFocus } from "@dolthub/react-hooks";
import { DiffRowType } from "@gen/graphql-types";
import { ApolloErrorType } from "@lib/errors/types";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DiffTable/DiffTableStats/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ErrorMsg from "@components/ErrorMsg";
import SmallLoader from "@components/SmallLoader";
import { useDiffContext } from "@contexts/diff";
import { SmallLoader } from "@dolthub/react-components";
import { DiffSummaryFragment, useDiffStatQuery } from "@gen/graphql-types";
import { gqlErrorPrimaryKeyChange } from "@lib/errors/graphql";
import { errorMatches } from "@lib/errors/helpers";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DiffTableNav/BackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Button from "@components/Button";
import Loader from "@components/Loader";
import CommitLogLink from "@components/links/CommitLogLink";
import PullLink from "@components/links/PullLink";
import { Loader } from "@dolthub/react-components";
import useDefaultBranch from "@hooks/useDefaultBranch";
import { DatabaseParams } from "@lib/params";
import { FaChevronLeft } from "@react-icons/all-files/fa/FaChevronLeft";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DiffTableNav/DiffTableStats/TableStat.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SummaryStat from "@components/DiffStat/SummaryStat";
import ErrorMsg from "@components/ErrorMsg";
import SmallLoader from "@components/SmallLoader";
import { useDiffContext } from "@contexts/diff";
import { SmallLoader } from "@dolthub/react-components";
import {
DiffStatForDiffsFragment,
DiffSummaryFragment,
Expand Down
2 changes: 1 addition & 1 deletion web/components/DocMarkdown/Buttons.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Button from "@components/Button";
import Loader from "@components/Loader";
import Link from "@components/links/Link";
import { Loader } from "@dolthub/react-components";
import useEditDoc from "@hooks/useEditDoc";
import { DocParams, RefParams } from "@lib/params";
import toDocType from "@lib/toDocType";
Expand Down
2 changes: 1 addition & 1 deletion web/components/DocMarkdown/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Button from "@components/Button";
import ButtonsWithError from "@components/ButtonsWithError";
import Loader from "@components/Loader";
import TextareaWithMarkdown from "@components/TextareaWithMarkdown";
import { Loader } from "@dolthub/react-components";
import useEditDoc from "@hooks/useEditDoc";
import { DocParams } from "@lib/params";
import toDocType from "@lib/toDocType";
Expand Down
2 changes: 1 addition & 1 deletion web/components/EditCellInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Btn from "@components/Btn";
import { toPKColsMapQueryCols } from "@components/CellButtons/queryHelpers";
import SmallLoader from "@components/SmallLoader";
import { useDataTableContext } from "@contexts/dataTable";
import { useSqlEditorContext } from "@contexts/sqleditor";
import { SmallLoader } from "@dolthub/react-components";
import { isNullValue } from "@dolthub/web-utils";
import {
ColumnForDataTableFragment,
Expand Down
3 changes: 1 addition & 2 deletions web/components/HelpPopup/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Popup from "@components/Popup";
import { Popup, PopupProps } from "@dolthub/react-components";
import { BsFillQuestionCircleFill } from "@react-icons/all-files/bs/BsFillQuestionCircleFill";
import cx from "classnames";
import { ReactNode } from "react";
import { PopupProps } from "reactjs-popup/dist/types";
import css from "./index.module.css";

type Props = {
Expand Down
37 changes: 0 additions & 37 deletions web/components/Loader/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion web/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import DocsLink from "@components/links/DocsLink";
import ExternalLink from "@components/links/ExternalLink";
import Link from "@components/links/Link";
import { ExternalLink } from "@dolthub/react-components";
import { dockerHubRepo, workbenchGithubRepo } from "@lib/constants";
import { FaDocker } from "@react-icons/all-files/fa/FaDocker";
import { FaGithub } from "@react-icons/all-files/fa/FaGithub";
Expand Down
20 changes: 0 additions & 20 deletions web/components/Popup/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion web/components/SchemaList/List.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import SmallLoader from "@components/SmallLoader";
import { SmallLoader } from "@dolthub/react-components";
import { pluralize } from "@dolthub/web-utils";
import { SchemaType } from "@gen/graphql-types";
import useSqlBuilder from "@hooks/useSqlBuilder";
Expand Down
2 changes: 1 addition & 1 deletion web/components/SchemaList/Procedures.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SmallLoader from "@components/SmallLoader";
import QueryHandler from "@components/util/QueryHandler";
import { SmallLoader } from "@dolthub/react-components";
import { SchemaType, useRowsForDoltProceduresQuery } from "@gen/graphql-types";
import { RefParams } from "@lib/params";
import List from "./List";
Expand Down
2 changes: 1 addition & 1 deletion web/components/SchemaList/Tables.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SmallLoader from "@components/SmallLoader";
import QueryHandler from "@components/util/QueryHandler";
import { SmallLoader } from "@dolthub/react-components";
import { SchemaType } from "@gen/graphql-types";
import useTableNames from "@hooks/useTableNames";
import { RefParams } from "@lib/params";
Expand Down
7 changes: 0 additions & 7 deletions web/components/SmallLoader/index.module.css

This file was deleted.

59 changes: 0 additions & 59 deletions web/components/SmallLoader/index.tsx

This file was deleted.

Loading

0 comments on commit d055bad

Please sign in to comment.