Skip to content

Commit

Permalink
chore: do aliased paths when useful
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-nguyen-cs committed Feb 9, 2024
1 parent 7d8945e commit 33bd303
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import MenuItem from "@mui/material/MenuItem";
import Alert from "@mui/material/Alert";
import DialogTitle from "@mui/material/DialogTitle";

import { createBaseURL } from "../utils";
import { createBaseURL } from "@/utils";

type Props = {
onCloseDialog: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import ListSubheader from "@mui/material/ListSubheader";
import MuiLink from "@mui/material/Link";
import SettingsIcon from "@mui/icons-material/Settings";
import { useTranslation } from "react-i18next";
import logoUrl from "../assets/logosmall.jpg";
import logoUrl from "@/assets/logosmall.jpg";

type ResponsiveAppBarProps = {
displayedPages: Array<{ translationKey: string; url: string }>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ListTranslations } from "./ListTranslations";
import ListAllEntryProperties from "./ListAllEntryProperties";
import ListAllNonEntryInfo from "./ListAllNonEntryInfo";
import equal from "fast-deep-equal";
import { createURL, getNodeType, toSnakeCase } from "../../utils";
import { createURL, getNodeType, toSnakeCase } from "@/utils";
import { useNavigate } from "react-router-dom";
import { useQuery } from "@tanstack/react-query";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
Button,
} from "@mui/material";
import { useState, useEffect } from "react";
import { getNodeType } from "../../utils";
import { getNodeType } from "@/utils";
import AddBoxIcon from "@mui/icons-material/AddBox";
import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline";
import ISO6391 from "iso-639-1";
import { greyHexCode } from "../../constants";
import { greyHexCode } from "@/constants";

/**
* Parent component used for rendering info on a stopword, synonym, header or footer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import useFetch from "../../components/useFetch";
import useFetch from "@/components/useFetch";
import {
Typography,
TextField,
Expand All @@ -18,8 +18,8 @@ import AddBoxIcon from "@mui/icons-material/AddBox";
import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline";
import CircularProgress from "@mui/material/CircularProgress";
import ISO6391 from "iso-639-1";
import { ENTER_KEYCODE } from "../../constants";
import { greyHexCode } from "../../constants";
import { ENTER_KEYCODE } from "@/constants";
import { greyHexCode } from "@/constants";

interface Relations {
index: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Link } from "react-router-dom";
import { Box, Stack, Typography } from "@mui/material";
import CircularProgress from "@mui/material/CircularProgress";

import useFetch from "../../components/useFetch";
import type { ParentsAPIResponse } from "../../backend-types/types";
import useFetch from "@/components/useFetch";
import type { ParentsAPIResponse } from "@/backend-types/types";

type Props = {
fetchUrl: string;
Expand Down
6 changes: 3 additions & 3 deletions taxonomy-editor-frontend/src/pages/editentry/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import DialogTitle from "@mui/material/DialogTitle";
import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline";
import AccumulateAllComponents from "./AccumulateAllComponents";

import { createBaseURL } from "../../utils";
import { greyHexCode } from "../../constants";
import WarningParsingErrors from "../../components/WarningParsingErrors";
import { createBaseURL } from "@/utils";
import { greyHexCode } from "@/constants";
import WarningParsingErrors from "@/components/WarningParsingErrors";

type EditEntryProps = {
addNavLinks: ({
Expand Down
6 changes: 3 additions & 3 deletions taxonomy-editor-frontend/src/pages/errors/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import useFetch from "../../components/useFetch";
import { toTitleCase } from "../../utils";
import { createBaseURL } from "../../utils";
import useFetch from "@/components/useFetch";
import { toTitleCase } from "@/utils";
import { createBaseURL } from "@/utils";
import { useParams } from "react-router-dom";
import {
Box,
Expand Down
8 changes: 4 additions & 4 deletions taxonomy-editor-frontend/src/pages/go-to-project/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import MaterialTable from "@material-table/core";
import EditIcon from "@mui/icons-material/Edit";
import CircularProgress from "@mui/material/CircularProgress";

import useFetch from "../../components/useFetch";
import { API_URL } from "../../constants";
import { toSnakeCase, toTitleCase } from "../../utils";
import type { ProjectsAPIResponse } from "../../backend-types/types";
import useFetch from "@/components/useFetch";
import { API_URL } from "@/constants";
import { toSnakeCase, toTitleCase } from "@/utils";
import type { ProjectsAPIResponse } from "@/backend-types/types";

type ProjectType = {
id: string;
Expand Down
4 changes: 2 additions & 2 deletions taxonomy-editor-frontend/src/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import Stack from "@mui/material/Stack";
import Container from "@mui/material/Container";
import logoUrl from "../../assets/logo.png";
import classificationImgUrl from "../../assets/classification.png";
import logoUrl from "@/assets/logo.png";
import classificationImgUrl from "@/assets/classification.png";

type Props = {
clearNavBarLinks: () => void;
Expand Down
12 changes: 6 additions & 6 deletions taxonomy-editor-frontend/src/pages/root-nodes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ import AddBoxIcon from "@mui/icons-material/AddBox";
import Dialog from "@mui/material/Dialog";
import CircularProgress from "@mui/material/CircularProgress";

import CreateNodeDialogContent from "../../components/CreateNodeDialogContent";
import { toTitleCase, createBaseURL } from "../../utils";
import { greyHexCode } from "../../constants";
import CreateNodeDialogContent from "@/components/CreateNodeDialogContent";
import { toTitleCase, createBaseURL } from "@/utils";
import { greyHexCode } from "@/constants";
import {
type ProjectInfoAPIResponse,
type RootEntriesAPIResponse,
ProjectStatus,
} from "../../backend-types/types";
import NodesTableBody from "../../components/NodesTableBody";
import WarningParsingErrors from "../../components/WarningParsingErrors";
} from "@/backend-types/types";
import NodesTableBody from "@/components/NodesTableBody";
import WarningParsingErrors from "@/components/WarningParsingErrors";
import { useQuery } from "@tanstack/react-query";

type RootNodesProps = {
Expand Down
12 changes: 6 additions & 6 deletions taxonomy-editor-frontend/src/pages/search/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import TableRow from "@mui/material/TableRow";
import AddBoxIcon from "@mui/icons-material/AddBox";
import Dialog from "@mui/material/Dialog";

import useFetch from "../../components/useFetch";
import { createBaseURL } from "../../utils";
import { greyHexCode } from "../../constants";
import type { SearchAPIResponse } from "../../backend-types/types";
import CreateNodeDialogContent from "../../components/CreateNodeDialogContent";
import NodesTableBody from "../../components/NodesTableBody";
import useFetch from "@/components/useFetch";
import { createBaseURL } from "@/utils";
import { greyHexCode } from "@/constants";
import type { SearchAPIResponse } from "@/backend-types/types";
import CreateNodeDialogContent from "@/components/CreateNodeDialogContent";
import NodesTableBody from "@/components/NodesTableBody";

type Props = {
query: string;
Expand Down
8 changes: 4 additions & 4 deletions taxonomy-editor-frontend/src/pages/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
import SearchIcon from "@mui/icons-material/Search";

import SearchResults from "./SearchResults";
import { ENTER_KEYCODE } from "../../constants";
import WarningParsingErrors from "../../components/WarningParsingErrors";
import { createBaseURL } from "../../utils";
import classificationImgUrl from "../../assets/classification.png";
import { ENTER_KEYCODE } from "@/constants";
import WarningParsingErrors from "@/components/WarningParsingErrors";
import { createBaseURL } from "@/utils";
import classificationImgUrl from "@/assets/classification.png";

type SearchNodeProps = {
addNavLinks: ({
Expand Down
4 changes: 2 additions & 2 deletions taxonomy-editor-frontend/src/pages/startproject/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
MenuItem,
} from "@mui/material";

import { TAXONOMY_NAMES } from "../../constants";
import { createBaseURL, toSnakeCase } from "../../utils";
import { TAXONOMY_NAMES } from "@/constants";
import { createBaseURL, toSnakeCase } from "@/utils";

const branchNameRegEx = /[^a-z0-9_]+/;

Expand Down

0 comments on commit 33bd303

Please sign in to comment.