Skip to content

Commit

Permalink
Fix settings by wrapping into a splat route
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Dec 9, 2024
1 parent 9099d99 commit 4842f02
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions app/routes/settings.$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Settings as AppSettings } from '@shlinkio/shlink-web-component/set
import { ShlinkWebSettings } from '@shlinkio/shlink-web-component/settings';
import { useCallback, useEffect, useState } from 'react';
import type { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router';
import { Route, Routes } from 'react-router';
import { useFetcher, useLoaderData } from 'react-router';
import { AuthHelper } from '../auth/auth-helper.server';
import { Layout } from '../common/Layout';
Expand Down Expand Up @@ -47,11 +48,18 @@ export default function Settings() {
return (
<Layout>
{isClient && (
<ShlinkWebSettings
settings={settings}
updateSettings={submitSettings}
defaultShortUrlsListOrdering={{}}
/>
<Routes>
<Route
path="*"
element={(
<ShlinkWebSettings
settings={settings}
updateSettings={submitSettings}
defaultShortUrlsListOrdering={{}}
/>

Check warning on line 59 in app/routes/settings.$.tsx

View check run for this annotation

Codecov / codecov/patch

app/routes/settings.$.tsx#L50-L59

Added lines #L50 - L59 were not covered by tests
)}
/>
</Routes>

Check warning on line 62 in app/routes/settings.$.tsx

View check run for this annotation

Codecov / codecov/patch

app/routes/settings.$.tsx#L61-L62

Added lines #L61 - L62 were not covered by tests
)}
</Layout>
);
Expand Down

0 comments on commit 4842f02

Please sign in to comment.