Skip to content

Commit

Permalink
fix: broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
iib0011 committed Feb 25, 2025
1 parent 8f6e023 commit 6d19b4f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>('');
Expand Down Expand Up @@ -98,7 +98,9 @@ export default function Hero() {
<Grid container spacing={2} mt={2}>
{exampleTools.map((tool) => (
<Grid
onClick={() => navigate(tool.url)}
onClick={() =>
navigate(tool.url.startsWith('/') ? tool.url : `/${tool.url}`)
}
item
xs={12}
md={6}
Expand Down

0 comments on commit 6d19b4f

Please sign in to comment.