Skip to content

Commit 7c1e713

Browse files
committed
suppress-reset-on-activate-other-tabs
1 parent 14b4921 commit 7c1e713

File tree

10 files changed

+1675
-1560
lines changed

10 files changed

+1675
-1560
lines changed

app/auth/components/LoginForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { LabeledTextField } from "app/core/components/LabeledTextField"
33
import { Form, FORM_ERROR } from "app/core/components/Form"
44
import login from "app/auth/mutations/login"
55
import { Login } from "app/auth/validations"
6-
import Card from "../../core/layouts/Card"
6+
import Card from "app/core/layouts/Card"
77
import { Flex } from "@chakra-ui/react"
88

99
type LoginFormProps = {

app/auth/components/SignupForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { LabeledTextField } from "app/core/components/LabeledTextField"
33
import { Form, FORM_ERROR } from "app/core/components/Form"
44
import signup from "app/auth/mutations/signup"
55
import { Signup } from "app/auth/validations"
6-
import Card from "../../core/layouts/Card"
6+
import Card from "app/core/layouts/Card"
77
import { Flex } from "@chakra-ui/react"
88

99
type SignupFormProps = {

app/core/components/Form.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { z } from "zod"
44
import { validateZodSchema } from "blitz"
55
export { FORM_ERROR } from "final-form"
66
import { Button, Flex } from "@chakra-ui/react"
7+
import deepEqual from "fast-deep-equal"
78

89
export interface FormProps<S extends z.ZodType<any, any>>
910
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
@@ -27,6 +28,7 @@ export function Form<S extends z.ZodType<any, any>>({
2728
return (
2829
<FinalForm
2930
initialValues={initialValues}
31+
initialValuesEqual={deepEqual}
3032
validate={validateZodSchema(schema)}
3133
onSubmit={onSubmit}
3234
render={({ handleSubmit, submitting, submitError }) => (

app/pages/projects/[projectId]/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import getProject from "app/projects/queries/getProject"
55
import updateProject from "app/projects/mutations/updateProject"
66
import { ProjectForm, FORM_ERROR } from "app/projects/components/ProjectForm"
77
import { Spinner, Flex, Breadcrumb, BreadcrumbItem, BreadcrumbLink } from "@chakra-ui/react"
8-
import Card from "../../../core/layouts/Card"
8+
import Card from "app/core/layouts/Card"
99
import { useCurrentUser } from "app/core/hooks/useCurrentUser"
1010

1111
const BreadCrumb = ({ project }) => {

app/pages/projects/new.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import createProject from "app/projects/mutations/createProject"
44
import { ProjectForm, FORM_ERROR } from "app/projects/components/ProjectForm"
55
import { Suspense } from "react"
66
import { Spinner, Flex, Breadcrumb, BreadcrumbItem, BreadcrumbLink } from "@chakra-ui/react"
7-
import Card from "../../core/layouts/Card"
7+
import Card from "app/core/layouts/Card"
88
import { useCurrentUser } from "app/core/hooks/useCurrentUser"
99

1010
const BreadCrumb = () => (

app/pages/stubs/[stubId]/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import updateStub from "app/stubs/mutations/updateStub"
66
import { StubForm, FORM_ERROR } from "app/stubs/components/StubForm"
77
import { Box, Spinner, Flex, Breadcrumb, BreadcrumbItem, BreadcrumbLink } from "@chakra-ui/react"
88
import getProject from "app/projects/queries/getProject"
9-
import Card from "../../../core/layouts/Card"
9+
import Card from "app/core/layouts/Card"
1010
import { useCurrentUser } from "app/core/hooks/useCurrentUser"
1111

1212
const BreadCrumb = ({ stub }) => {

app/pages/stubs/new.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { StubForm, FORM_ERROR } from "app/stubs/components/StubForm"
55
import { Spinner, Flex, Breadcrumb, BreadcrumbItem, BreadcrumbLink } from "@chakra-ui/react"
66
import getProject from "app/projects/queries/getProject"
77
import { Suspense } from "react"
8-
import Card from "../../core/layouts/Card"
8+
import Card from "app/core/layouts/Card"
99
import { useCurrentUser } from "app/core/hooks/useCurrentUser"
1010

1111
const BreadCrumb = ({ projectId }) => {

app/stubs/components/StubForm.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { LabeledSelectField } from "app/core/components/LabeledSelectField"
55
import { useRouterQuery } from "blitz"
66
import { z } from "zod"
77
export { FORM_ERROR } from "app/core/components/Form"
8-
import Card from "../../core/layouts/Card"
9-
import { border } from "@chakra-ui/styled-system"
8+
import Card from "app/core/layouts/Card"
109

1110
export function StubForm<S extends z.ZodType<any, any>>(props: FormProps<S>) {
1211
const query = useRouterQuery()

0 commit comments

Comments
 (0)