Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit b0770f0

Browse files
committed
fix: tests cant resolve import
Remove indirect exports that break tests that dont even use the functions exported.
1 parent 9e10acd commit b0770f0

11 files changed

Lines changed: 13 additions & 14 deletions

File tree

apps/admin-ui/src/common/Error403.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Button, Link } from "hds-react";
22
import React from "react";
33
import { useTranslation } from "react-i18next";
4-
import { signOut, useSession } from "app/hooks/auth";
54
import styled from "styled-components";
5+
import { signOut } from "common/src/browserHelpers";
66
import { H1 } from "common/src/common/typography";
77
import { breakpoints } from "common/src/common/style";
8+
import { useSession } from "@/hooks/auth";
89
import { PUBLIC_URL } from "./const";
910

1011
const Wrapper = styled.div`

apps/admin-ui/src/component/MainLander.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import styled from "styled-components";
33
import { useTranslation } from "react-i18next";
4-
import { signIn } from "app/hooks/auth";
4+
import { signIn } from "common/src/browserHelpers";
55
import { Button, IconArrowRight, IconGroup } from "hds-react";
66
import { H2 } from "common/src/common/typography";
77
import { breakpoints } from "common/src/common/style";

apps/admin-ui/src/component/Navigation.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import styled from "styled-components";
55
import { UserInfo } from "common";
66
import { breakpoints } from "common/src/common/style";
77
import { useNavigate } from "react-router-dom";
8-
import { signIn, signOut, useSession } from "@/hooks/auth";
8+
import { useSession } from "@/hooks/auth";
9+
import { signIn, signOut } from "common/src/browserHelpers";
910
import { PUBLIC_URL } from "@/common/const";
1011
import { StyledHDSNavigation } from "@/styles/util";
1112
import MainMenu from "./MainMenu";

apps/admin-ui/src/hooks/auth/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { useCurrentUserQuery } from "@gql/gql-types";
22

3-
export { signIn, signOut } from "common/src/browserHelpers";
4-
53
export function useSession() {
64
const { data, error } = useCurrentUserQuery();
75
const user = data?.currentUser ?? undefined;

apps/ui/components/LoginFragment.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React from "react";
22
import { useTranslation } from "next-i18next";
33
import styled from "styled-components";
44
import { breakpoints } from "common/src/common/style";
5-
import { signIn, useSession } from "~/hooks/auth";
5+
import { signIn } from "common/src/browserHelpers";
6+
import { useSession } from "~/hooks/auth";
67
import { MediumButton } from "@/styles/util";
78

89
type Props = {

apps/ui/components/common/Navigation/NavigationUserMenu/NavigationUserMenu.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import {
77
import { useTranslation } from "next-i18next";
88
import { useRouter } from "next/router";
99
import styled, { css } from "styled-components";
10-
import { signIn, signOut, useSession } from "~/hooks/auth";
10+
import { useSession } from "~/hooks/auth";
11+
import { signIn, signOut } from "common/src/browserHelpers";
1112
import { NavigationUserMenuUserCard } from "./NavigationUserMenuUserCard";
1213
import { MenuItem } from "../types";
1314

apps/ui/components/reservation/DeleteCancelled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import styled from "styled-components";
66
import Link from "next/link";
77
import { IconArrowRight, IconSignout } from "hds-react";
88
import { Container } from "common";
9-
import { signOut } from "~/hooks/auth";
9+
import { signOut } from "common/src/browserHelpers";
1010
import { Paragraph } from "./styles";
1111
import { LinkButton } from "../../styles/util";
1212
import { singleSearchUrl } from "../../modules/util";

apps/ui/components/reservation/ReservationCancellation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { getSelectedOption, getTranslation } from "@/modules/util";
1919
import { BlackButton, MediumButton, Toast } from "@/styles/util";
2020
import { ReservationInfoCard } from "./ReservationInfoCard";
2121
import { Paragraph } from "./styles";
22-
import { signOut } from "@/hooks/auth";
22+
import { signOut } from "common/src/browserHelpers";
2323
import {
2424
BylineSection,
2525
Heading,

apps/ui/components/reservation/ReservationConfirmation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ import {
1818
import { Subheading } from "common/src/reservation-form/styles";
1919
import { breakpoints } from "common/src/common/style";
2020
import { IconButton } from "common/src/components";
21+
import { signOut } from "common/src/browserHelpers";
2122
import { getReservationUnitInstructionsKey } from "../../modules/reservationUnit";
2223
import { getTranslation, reservationsUrl } from "../../modules/util";
2324
import { BlackButton } from "../../styles/util";
2425
import { Paragraph } from "./styles";
2526
import { reservationUnitPath } from "../../modules/const";
26-
import { signOut } from "@/hooks/auth";
2727

2828
type Node = NonNullable<ReservationQuery["reservation"]>;
2929
type Props = {

apps/ui/components/reservation/ReservationFail.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import React from "react";
66
import { useTranslation } from "next-i18next";
77
import styled from "styled-components";
88
import { Container } from "common";
9-
import { signOut } from "~/hooks/auth";
10-
9+
import { signOut } from "common/src/browserHelpers";
1110
import { Paragraph } from "./styles";
1211
import { singleSearchUrl } from "../../modules/util";
1312
import { LinkButton } from "../../styles/util";

0 commit comments

Comments
 (0)