Skip to content

Commit

Permalink
Merge pull request #3205 from navikt/refactor/frontend-common
Browse files Browse the repository at this point in the history
flytt Lenke til frontend-common
  • Loading branch information
sondrele authored Feb 2, 2024
2 parents 831296f + 98c9349 commit a240420
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface LinkProps extends RouterLinkProps {
children?: React.ReactNode;
}

function Lenke({ children, isExternal = false, to, className, ...others }: LinkProps) {
export function Lenke({ children, isExternal = false, to, className, ...others }: LinkProps) {
return isExternal ? (
<Link
target="_blank"
Expand All @@ -27,5 +27,3 @@ function Lenke({ children, isExternal = false, to, className, ...others }: LinkP
</RouterLink>
);
}

export default Lenke;
4 changes: 1 addition & 3 deletions frontend/frontend-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
"description": "Felleskode for frontend-applikasjoner for Team Valp",
"module": "index.ts",
"types": "index.tsx",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"react-router-dom": "6.21.3",
"react-select": "^5.8.0",
"@navikt/ds-react": "5.15.1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Lenke from "mulighetsrommet-veileder-flate/src/components/lenke/Lenke";
import classNames from "classnames";
import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import style from "./Lenkeknapp.module.scss";

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion frontend/mr-admin-flate/src/components/notater/Notat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styles from "./Notater.module.scss";
import { BodyLong, BodyShort, Button } from "@navikt/ds-react";
import { formaterDatoTid } from "../../utils/Utils";
import { TrashIcon } from "@navikt/aksel-icons";
import Lenke from "mulighetsrommet-veileder-flate/src/components/lenke/Lenke";
import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import { AvtaleNotat, TiltaksgjennomforingNotat } from "mulighetsrommet-api-client";
import { useHentAnsatt } from "../../api/ansatt/useHentAnsatt";
import { NOM_ANSATT_SIDE } from "mulighetsrommet-frontend-common/constants";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Alert, Button, Checkbox, Pagination, Table } from "@navikt/ds-react";
import classNames from "classnames";
import { useAtom, WritableAtom } from "jotai";
import { OpenAPI, SorteringAvtaler } from "mulighetsrommet-api-client";
import Lenke from "mulighetsrommet-veileder-flate/src/components/lenke/Lenke";
import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import { createRef, useEffect, useState } from "react";
import { AvtaleFilter } from "../../api/atoms";
import { APPLICATION_NAME } from "../../constants";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Alert, Checkbox, Pagination, Table, Tag, VStack } from "@navikt/ds-react";
import { useAtom, WritableAtom } from "jotai";
import { SorteringTiltaksgjennomforinger } from "mulighetsrommet-api-client";
import Lenke from "mulighetsrommet-veileder-flate/src/components/lenke/Lenke";
import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import React from "react";
import { TiltaksgjennomforingFilter } from "../../api/atoms";
import { useSort } from "../../hooks/useSort";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Alert, Table } from "@navikt/ds-react";
import classNames from "classnames";
import { useAtom } from "jotai";
import { SorteringTiltakstyper } from "mulighetsrommet-api-client";
import Lenke from "mulighetsrommet-veileder-flate/src/components/lenke/Lenke";
import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import { tiltakstypeFilterAtom } from "../../api/atoms";
import { useTiltakstyper } from "../../api/tiltakstyper/useTiltakstyper";
import { useSort } from "../../hooks/useSort";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Alert, Button } from "@navikt/ds-react";
import { ApiError, Toggles } from "mulighetsrommet-api-client";
import { useTitle } from "mulighetsrommet-frontend-common";
import { PORTEN } from "mulighetsrommet-frontend-common/constants";
import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import { TiltakLoader } from "@/components/TiltakLoader";
import { BrukersOppfolgingsenhetVarsel } from "@/apps/modia/varsler/BrukersOppfolgingsenhetVarsel";
import { Feilmelding, ForsokPaNyttLink } from "@/components/feilmelding/Feilmelding";
Expand All @@ -21,7 +22,6 @@ import { useVeilederTiltaksgjennomforinger } from "@/core/api/queries/useTiltaks
import { useResetArbeidsmarkedstiltakFilter } from "@/hooks/useArbeidsmarkedstiltakFilter";
import { ManglerInnsatsOgServicegruppeVarsel } from "@/apps/modia/varsler/ManglerInnsatsOgServiceGruppeVarsel";
import { FilterMenyMedSkeletonLoader } from "@/components/filtrering/FilterMenyMedSkeletonLoader";
import Lenke from "@/components/lenke/Lenke";

export const ModiaArbeidsmarkedstiltakOversikt = () => {
useTitle("Arbeidsmarkedstiltak - Oversikt");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Lenke from "../lenke/Lenke";
import { BodyShort } from "@navikt/ds-react";
import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import { PORTEN } from "mulighetsrommet-frontend-common/constants";
import { APPLICATION_WEB_COMPONENT_NAME } from "../../constants";
import { APPLICATION_WEB_COMPONENT_NAME } from "@/constants";
import { useEffect, useState } from "react";
import { Step } from "react-joyride";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import {
TiltaksgjennomforingOppstartstype,
VeilederflateTiltaksgjennomforing,
} from "mulighetsrommet-api-client";
import { paginationAtom } from "../../core/atoms/atoms";
import { formaterDato, kebabCase } from "../../utils/Utils";
import Lenke from "../lenke/Lenke";

import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import { paginationAtom } from "@/core/atoms/atoms";
import { formaterDato, kebabCase } from "@/utils/Utils";
import styles from "./Gjennomforingsrad.module.scss";
import { useAtomValue } from "jotai";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Lenke from "../lenke/Lenke";
import { Lenke } from "mulighetsrommet-frontend-common/components/Lenke";
import styles from "./Tilbakeknapp.module.scss";
import { BodyShort } from "@navikt/ds-react";
import { ChevronLeftIcon } from "@navikt/aksel-icons";
Expand Down
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a240420

Please sign in to comment.