Skip to content

Commit 0dcdfe7

Browse files
committed
Redirect index to getting started
1 parent b5077d5 commit 0dcdfe7

File tree

6 files changed

+19
-59
lines changed

6 files changed

+19
-59
lines changed

articles/Custom-input.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,30 +53,3 @@ function ExampleForm() {
5353
);
5454
}
5555
```
56-
57-
## Example: Submit button that disables when unmodified/error
58-
59-
![live updating form values](https://raw.githubusercontent.com/wiki/CodeStix/typed-react-form/images/submitbutton.gif)
60-
61-
```jsx
62-
function FormExample() {
63-
const form = useForm(
64-
{
65-
name: "John",
66-
},
67-
(values) => ({ name: values.name.length < 3 ? "Name must be longer" : undefined }) // Example validator
68-
);
69-
return (
70-
<form
71-
onSubmit={(ev) => {
72-
ev.preventDefault();
73-
console.log("save", form.values);
74-
form.setDefaultValues(form.values);
75-
}}>
76-
<FormInput form={form} name="name" />
77-
{/* Listen for any change on the form */}
78-
<AnyListener form={form} render={(form) => <button disabled={!form.dirty || form.error}>Save</button>} />
79-
</form>
80-
);
81-
}
82-
```
File renamed without changes.

components/CenterContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const InnerContainer = styled.div`
1212
`;
1313

1414
const OuterContainer = styled.div`
15-
max-width: 1200px;
16-
width: 1200px;
15+
max-width: 1300px;
16+
width: 1300px;
1717
`;
1818

1919
export function CenterContainer({ children, ...rest }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) {

components/SideBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const CATEGORIES = [
88
{
99
category: "Basic",
1010
items: [
11-
{ name: "Getting started", url: "/docs/Home" },
11+
{ name: "Getting started", url: "/docs/Getting-started" },
1212
{ name: "FormInput", url: "/docs/FormInput" },
1313
{ name: "FormTextArea", url: "/docs/FormTextArea" },
1414
{ name: "FormSelect", url: "/docs/FormSelect" },

next.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
async redirects() {
3+
return [
4+
{
5+
source: "/",
6+
destination: "/docs/Getting-started",
7+
permanent: false,
8+
},
9+
{
10+
source: "/docs",
11+
destination: "/docs/Getting-started",
12+
permanent: false,
13+
},
14+
];
15+
},
16+
};

pages/index.tsx

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)