Skip to content

Commit

Permalink
add require auth wrapper back in
Browse files Browse the repository at this point in the history
  • Loading branch information
esizer committed Dec 19, 2024
1 parent 6cdeaef commit 6643a38
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import profileMessages from "~/messages/profileMessages";
import AccountManagement from "./AccountManagement";
import RecruitmentAvailability from "./RecruitmentAvailability";
import NotificationSettings from "./NotificationSettings";
import RequireAuth from "~/components/RequireAuth/RequireAuth";

Check failure on line 25 in apps/web/src/pages/Profile/AccountSettings/AccountSettingsPage.tsx

View workflow job for this annotation

GitHub Actions / Lint

`~/components/RequireAuth/RequireAuth` import should occur before import of `./AccountManagement`
import { ROLE_NAME } from "@gc-digital-talent/auth";

Check failure on line 26 in apps/web/src/pages/Profile/AccountSettings/AccountSettingsPage.tsx

View workflow job for this annotation

GitHub Actions / Lint

`@gc-digital-talent/auth` import should occur before import of `~/hooks/useBreadcrumbs`

const AccountSettings_Query = graphql(/* GraphQL */ `
query AccountSettings {
Expand Down Expand Up @@ -65,7 +67,7 @@ const inlineLink = (href: string, chunks: ReactNode) => (
</Link>
);

export const Component = () => {
const AccountSettingsPage = () => {
const intl = useIntl();
const paths = useRoutes();

Expand Down Expand Up @@ -238,12 +240,12 @@ export const Component = () => {
);
};

// export const Component = () => (
// <RequireAuth roles={[ROLE_NAME.Applicant]}>
// <AccountSettingsPage />
// </RequireAuth>
// );
export const Component = () => (
<RequireAuth roles={[ROLE_NAME.Applicant]}>
<AccountSettingsPage />
</RequireAuth>
);

Component.displayName = "AccountSettingsPage";

export default Component;
export default AccountSettingsPage;

0 comments on commit 6643a38

Please sign in to comment.