Skip to content

Commit

Permalink
Move codapContext file to hooks folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
lublagg committed Sep 17, 2024
1 parent bb94562 commit 3dbb5af
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useCallback, useEffect, useState } from "react";
import { useCodapContext } from "./CodapContext";
import { useCodapContext } from "../hooks/useCodapContext";
import { InteractiveState } from "../types";
import { NestedTable } from "./nested-table";
import { Hierarchy } from "./hierarchy-view/hierarchy";
Expand Down
2 changes: 1 addition & 1 deletion src/components/editable-table-cell.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactNode, useState } from "react";
import { Editable, EditablePreview, EditableInput } from "@chakra-ui/react";
import { updateCaseById } from "@concord-consortium/codap-plugin-api";
import { useCodapContext } from "./CodapContext";
import { useCodapContext } from "../hooks/useCodapContext";

import css from "./editable-table-cell.scss";

Expand Down
2 changes: 1 addition & 1 deletion src/components/flat-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CaseValuesWithId, ITableProps } from "../types";
import { DraggableTableContainer, DraggagleTableHeader } from "./draggable-table-tags";
import { getAttrPrecisions, getAttrTypes, getAttrVisibility } from "../utils/utils";
import { TableCell } from "./table-cell";
import { useCodapContext } from "./CodapContext";
import { useCodapContext } from "../hooks/useCodapContext";

import css from "./tables.scss";

Expand Down
2 changes: 1 addition & 1 deletion src/components/landscape-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DraggagleTableHeader } from "./draggable-table-tags";
import { getAttrPrecisions, getAttrTypes, getAttrVisibility } from "../utils/utils";
import { TableHeaders } from "./table-headers";
import { TableCell } from "./table-cell";
import { useCodapContext } from "./CodapContext";
import { useCodapContext } from "../hooks/useCodapContext";

import css from "./tables.scss";

Expand Down
2 changes: 1 addition & 1 deletion src/components/menu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { useCodapContext } from "./CodapContext";
import { useCodapContext } from "../hooks/useCodapContext";

import css from "./menu.scss";

Expand Down
2 changes: 1 addition & 1 deletion src/components/nested-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PortraitView } from "./portrait-view";
import { LandscapeView } from "./landscape-view";
import { FlatTable } from "./flat-table";
import { DraggableTableContext, useDraggableTable } from "../hooks/useDraggableTable";
import { useCodapContext } from "./CodapContext";
import { useCodapContext } from "../hooks/useCodapContext";

import css from "./nested-table.scss";

Expand Down
2 changes: 1 addition & 1 deletion src/components/portrait-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DraggableTableContainer, DroppableTableData, DroppableTableHeader } fro
import { TableScrollTopContext, useTableScrollTop } from "../hooks/useTableScrollTop";
import { getAttrPrecisions, getAttrTypes, getAttrVisibility } from "../utils/utils";
import { TableHeaders } from "./table-headers";
import { useCodapContext } from "./CodapContext";
import { useCodapContext } from "../hooks/useCodapContext";
import { TableCell } from "./table-cell";

import css from "./tables.scss";
Expand Down
2 changes: 1 addition & 1 deletion src/components/table-headers.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { DraggagleTableHeader } from "./draggable-table-tags";
import { Values } from "../types";
import { useCodapContext } from "./CodapContext";
import { useCodapContext } from "../hooks/useCodapContext";

interface MapHeadersFromValuesProps {
collectionId: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { createContext, ReactNode, useContext, useEffect } from "react";
import { CodapState } from "../types";
import { useCodapState } from "../hooks/useCodapState";
import { useCodapState } from "./useCodapState";

const CodapContext = createContext({} as CodapState);

Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { createRoot } from "react-dom/client";
import { CodapProvider } from "./components/CodapContext";
import { CodapProvider } from "./hooks/useCodapContext";
import App from "./components/app";

import "./index.css";
Expand Down

0 comments on commit 3dbb5af

Please sign in to comment.