Skip to content

Commit

Permalink
feat: react helmet
Browse files Browse the repository at this point in the history
  • Loading branch information
iib0011 committed Jun 22, 2024
1 parent e2a5165 commit 17ba68b
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 47 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
with:
publish-dir: ./dist
production-branch: main
deploy-message: Deploy from GitHub Actions
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: true
Expand Down
81 changes: 50 additions & 31 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

Welcome to **OmniTools**, an open-source alternative to OnlineTools.com.
This project offers a variety of online tools to help with everyday tasks,
all available for free and open for community contributions. Our goal is to provide reliable and
efficient online tools while fostering a community-driven development process.
all available for free and open for community contributions. Please don't forget to star the repo if you find it useful.

## Table of Contents

Expand Down
38 changes: 38 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"notistack": "^3.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet": "^6.1.0",
"react-router-dom": "^6.23.1",
"yup": "^1.4.0"
},
Expand All @@ -44,6 +45,7 @@
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-helmet": "^6.1.11",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react-swc": "^3.7.0",
Expand Down
34 changes: 29 additions & 5 deletions src/components/ToolLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
import {Box} from "@mui/material";
import {ReactNode} from "react";
import { Box } from '@mui/material';
import React, { ReactNode } from 'react';
import { Helmet } from 'react-helmet';
import ToolHeader from './ToolHeader';

export default function ToolLayout({children}: { children: ReactNode }) {
return (<Box width={'100%'} display={'flex'} flexDirection={'column'} alignItems={'center'}><Box
width={'85%'}>{children}</Box></Box>)
export default function ToolLayout({
children,
title,
description
}: {
title: string;
description: string;
children: ReactNode;
}) {
return (
<Box
width={'100%'}
display={'flex'}
flexDirection={'column'}
alignItems={'center'}
>
<Helmet>
<title>{`${title} - Omni Tools`}</title>
</Helmet>
<Box width={'85%'}>
<ToolHeader title={title} description={description} />
{children}
</Box>
</Box>
);
}
14 changes: 6 additions & 8 deletions src/pages/string/split/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,12 @@ export default function SplitText() {
});

return (
<ToolLayout>
<ToolHeader
title={'Text Splitter'}
description={
"World's simplest browser-based utility for splitting text. Load your text in the input form on the left and you'll automatically get pieces of this text on the right. Powerful, free, and fast. Load text – get chunks."
}
/>

<ToolLayout
title={'Text Splitter'}
description={
"World's simplest browser-based utility for splitting text. Load your text in the input form on the left and you'll automatically get pieces of this text on the right. Powerful, free, and fast. Load text – get chunks."
}
>
<Grid container spacing={2}>
<Grid item xs={6}>
<ToolTextInput value={input} onChange={setInput} />
Expand Down

0 comments on commit 17ba68b

Please sign in to comment.