mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-16 04:22:31 +01:00
✨ Removes trailing slashes from URLs on save
This commit is contained in:
@@ -11,11 +11,12 @@ import {
|
||||
IconPlug,
|
||||
} from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { removeTrailingSlash } from 'next/dist/shared/lib/router/utils/remove-trailing-slash';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { useConfigContext } from '~/config/provider';
|
||||
import { useConfigStore } from '~/config/store';
|
||||
import { AppType } from '~/types/app';
|
||||
|
||||
import { DebouncedImage } from '../../../IconSelector/DebouncedImage';
|
||||
import { useEditModeStore } from '../../Views/useEditModeStore';
|
||||
import { AppearanceTab } from './Tabs/AppereanceTab/AppereanceTab';
|
||||
@@ -90,6 +91,9 @@ export const EditAppModal = ({
|
||||
return;
|
||||
}
|
||||
|
||||
values.url = removeTrailingSlash(values.url);
|
||||
values.behaviour.externalUrl = removeTrailingSlash(values.behaviour.externalUrl);
|
||||
|
||||
updateConfig(
|
||||
configName,
|
||||
(previousConfig) => ({
|
||||
|
||||
Reference in New Issue
Block a user