From 6d19b4f25b3a242e2288ca98b368d69cef3a139d Mon Sep 17 00:00:00 2001 From: "Ibrahima G. Coulibaly" Date: Tue, 25 Feb 2025 13:02:00 +0000 Subject: [PATCH] fix: broken links --- src/components/Hero.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Hero.tsx b/src/components/Hero.tsx index 9f226a3..3074f45 100644 --- a/src/components/Hero.tsx +++ b/src/components/Hero.tsx @@ -15,12 +15,12 @@ const exampleTools: { label: string; url: string }[] = [ }, { label: 'Convert text to morse code', url: '/string/to-morse' }, { label: 'Change GIF speed', url: '/gif/change-speed' }, - { label: 'Sort a list', url: 'list/sort' }, - { label: 'Compress PNG', url: 'png/compress-png' }, + { label: 'Sort a list', url: '/list/sort' }, + { label: 'Compress PNG', url: '/png/compress-png' }, { label: 'Split a text', url: '/string/split' }, { label: 'Calculate number sum', url: '/number/sum' }, - { label: 'Shuffle a list', url: 'list/shuffle' }, - { label: 'Change colors in image', url: 'png/change-colors-in-png' } + { label: 'Shuffle a list', url: '/list/shuffle' }, + { label: 'Change colors in image', url: '/png/change-colors-in-png' } ]; export default function Hero() { const [inputValue, setInputValue] = useState(''); @@ -98,7 +98,9 @@ export default function Hero() { {exampleTools.map((tool) => ( navigate(tool.url)} + onClick={() => + navigate(tool.url.startsWith('/') ? tool.url : `/${tool.url}`) + } item xs={12} md={6}