Skip to content

Commit 93edde7

Browse files
authored
Merge pull request #85 from samvera-labs/2858-pathing-cleanup
Cleanup paths on imports.
2 parents 0418fa3 + bb7b45c commit 93edde7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+248
-138
lines changed

jest.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import type { Config } from "@jest/types";
44
// Sync object
55
const config: Config.InitialOptions = {
66
moduleDirectories: ["node_modules", "src"],
7+
moduleNameMapper: {
8+
"@/(.*)": "<rootDir>/src/$1",
9+
},
710
roots: ["<rootDir>/src"],
811
setupFilesAfterEnv: ["./jest-setup.ts"],
912
testEnvironment: "jsdom",

src/components/CopyText.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
2-
import { styled } from "stitches";
3-
import { useCopyToClipboard, CopyStatus } from "hooks/useCopyToClipboard";
2+
import { styled } from "@/stitches";
3+
import { useCopyToClipboard, CopyStatus } from "@/hooks/useCopyToClipboard";
44

55
const Status = styled("span", {
66
display: "flex",

src/components/ImageViewer/Button.styled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { styled } from "@stitches/react";
1+
import { styled } from "@/stitches";
22

33
const Item = styled("button", {
44
display: "flex",

src/components/ImageViewer/Button.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import { render, screen } from "@testing-library/react";
3-
import Button from "./Button";
3+
import Button from "@/components/ImageViewer/Button";
44

55
describe("Button component", () => {
66
it("renders", () => {

src/components/ImageViewer/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { Item } from "./Button.styled";
2+
import { Item } from "@/components/ImageViewer/Button.styled";
33

44
interface ButtonProps {
55
id: string;

src/components/ImageViewer/Controls.styled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { styled } from "@stitches/react";
1+
import { styled } from "@/stitches";
22

33
const Wrapper = styled("div", {
44
position: "absolute",

src/components/ImageViewer/Controls.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import { render, screen } from "@testing-library/react";
3-
import Controls from "./Controls";
3+
import Controls from "@/components/ImageViewer/Controls";
44

55
describe("Controls component", () => {
66
it("renders", () => {

src/components/ImageViewer/Controls.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
2-
import Button from "./Button";
3-
import { Wrapper } from "./Controls.styled";
2+
import Button from "@/components/ImageViewer/Button";
3+
import { Wrapper } from "@/components/ImageViewer/Controls.styled";
44

55
const Controls: React.FC = () => {
66
const ZoomIn = () => {

src/components/ImageViewer/ImageViewer.styled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { styled } from "stitches";
1+
import { styled } from "@/stitches";
22

33
const Navigator = styled("div", {
44
position: "absolute !important",

src/components/ImageViewer/ImageViewer.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { enableFetchMocks } from "jest-fetch-mock";
22
import React from "react";
33
import { render } from "@testing-library/react";
4-
import ImageViewer from "./ImageViewer";
5-
import { tileSourceResponse } from "../../services/iiif-test-fixtures";
4+
import ImageViewer from "@/components/ImageViewer/ImageViewer";
5+
import { tileSourceResponse } from "@/services/iiif-test-fixtures";
66

77
enableFetchMocks();
88

0 commit comments

Comments
 (0)