Skip to content

Commit

Permalink
Revert next 15 (breaks react-leaftlet)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Jun 27, 2024
1 parent 6f1df54 commit d745366
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 297 deletions.
6 changes: 3 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"isomorphic-dompurify": "^2.12.0",
"leaflet": "^1.9.4",
"marked": "^9.1.6",
"next": "15.0.0-rc.0",
"next": "14.2.4",
"pica": "^9.0.1",
"react": "19.0.0-rc-8971381549-20240625",
"react": "^18",
"react-avatar-editor": "^13.0.2",
"react-dom": "19.0.0-rc-8971381549-20240625",
"react-dom": "^18",
"react-error-boundary": "^4.0.13",
"react-hook-form": "^7.52.0",
"react-leaflet": "^4.2.1",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/(default)/users/[username]/logoutButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import Button from "@peated/web/components/button";
import { logout } from "@peated/web/lib/auth.actions";
import { useActionState } from "react";
import { useFormState } from "react-dom";

export default function LogoutButton() {
// TODO: this needs to show some kind of loading state
const [, formAction] = useActionState(logout, undefined);
const [, formAction] = useFormState(logout, undefined);
return (
<form action={formAction}>
<Button type="submit" color="primary">
Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/components/loginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import GoogleLoginButton from "@peated/web/components/googleLoginButton";
import TextField from "@peated/web/components/textField";
import config from "@peated/web/config";
import { authenticate } from "@peated/web/lib/auth.actions";
import { useActionState } from "react";
import { useFormStatus } from "react-dom";
import { useFormState, useFormStatus } from "react-dom";
import Alert from "./alert";

function BasicLogin({ action }: { action: any }) {
Expand Down Expand Up @@ -41,7 +40,7 @@ function BasicLogin({ action }: { action: any }) {
}

export default function LoginForm() {
const [error, formAction] = useActionState(authenticate, undefined);
const [error, formAction] = useFormState(authenticate, undefined);

return (
<div className="min-w-sm mt-8 flex-auto">
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/logoutButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";

import { logout } from "@peated/web/lib/auth.actions";
import { useActionState } from "react";
import { useFormState } from "react-dom";

export default function LogoutButton() {
// TODO: this needs to show some kind of loading state
const [, formAction] = useActionState(logout, undefined);
const [, formAction] = useFormState(logout, undefined);
return (
<form action={formAction}>
<button type="submit">Sign out</button>
Expand Down
Loading

0 comments on commit d745366

Please sign in to comment.