Skip to content

Commit

Permalink
Endre paths
Browse files Browse the repository at this point in the history
  • Loading branch information
frodehansen2 committed Dec 9, 2023
1 parent 52f1611 commit a6553dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions apps/dine-pleiepenger/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
pageExtensions: ['page.tsx', 'api.ts'],
transpilePackages: ['tailwind-merge'],
assetPrefix: '/dine-pleiepenger',
experimental: {
optimizePackageImports: ['@navikt/aksel-icons', '@navikt/ds-react'],
},
Expand All @@ -36,7 +35,9 @@ const nextConfig = {
ignoreDuringBuilds: true,
},

redirects: async () => [{ source: '/', destination: '/dine-pleiepenger', permanent: false, basePath: false }],
redirects: async () => [
{ source: '/', destination: process.env.NEXT_PUBLIC_BASE_PATH, permanent: false, basePath: false },
],

async headers() {
if (isE2E) return [];
Expand Down
3 changes: 2 additions & 1 deletion apps/dine-pleiepenger/src/pages/_app.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ import 'react-loading-skeleton/dist/skeleton.css';
import '../components/process/process.css';
import '../style/global.css';
import Head from 'next/head';
import { browserEnv } from '../utils/env';

function MyApp({ Component, pageProps }: AppProps<ServerSidePropsResult>): ReactElement {
const { data, error, isLoading } = useSWR<Innsynsdata, AxiosError>(
'/dine-pleiepenger/api/innsynsdata',
`${browserEnv.NEXT_PUBLIC_BASE_PATH}/api/innsynsdata`,
innsynsdataFetcher,
{
revalidateOnFocus: false,
Expand Down

0 comments on commit a6553dc

Please sign in to comment.