Skip to content

Commit

Permalink
chore: run replace-remix-imports migration (remix-run#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey authored Apr 1, 2022
1 parent d51a99c commit 399001c
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 59 deletions.
2 changes: 1 addition & 1 deletion app/entry.client.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RemixBrowser } from "@remix-run/react";
import { hydrate } from "react-dom";
import { RemixBrowser } from "remix";

hydrate(<RemixBrowser />, document);
4 changes: 2 additions & 2 deletions app/entry.server.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { EntryContext } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { renderToString } from "react-dom/server";
import { RemixServer } from "remix";
import type { EntryContext } from "remix";

export default function handleRequest(
request: Request,
Expand Down
13 changes: 3 additions & 10 deletions app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import {
json,
Links,
LiveReload,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "remix";
import type { LinksFunction, MetaFunction, LoaderFunction } from "remix";
import type { LinksFunction, LoaderFunction, MetaFunction } from "@remix-run/node";
import { json } from "@remix-run/node";
import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration } from "@remix-run/react";

import tailwindStylesheetUrl from "./styles/tailwind.css";
import { getUser } from "./session.server";
Expand Down
3 changes: 2 additions & 1 deletion app/routes/healthcheck.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// learn more: https://fly.io/docs/reference/configuration/#services-http_checks
import type { LoaderFunction } from "remix";
import type { LoaderFunction } from "@remix-run/node";

import { prisma } from "~/db.server";

export const loader: LoaderFunction = async ({ request }) => {
Expand Down
3 changes: 2 additions & 1 deletion app/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Link } from "remix";
import { Link } from "@remix-run/react";

import { useOptionalUser } from "~/utils";

export default function Index() {
Expand Down
16 changes: 7 additions & 9 deletions app/routes/join.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import type {
ActionFunction,
LoaderFunction,
MetaFunction,
} from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Form, Link, useActionData, useSearchParams } from "@remix-run/react";
import * as React from "react";
import type { ActionFunction, LoaderFunction, MetaFunction } from "remix";
import {
Form,
Link,
redirect,
useSearchParams,
json,
useActionData,
} from "remix";

import { getUserId, createUserSession } from "~/session.server";

Expand Down
16 changes: 7 additions & 9 deletions app/routes/login.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import type {
ActionFunction,
LoaderFunction,
MetaFunction,
} from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Form, Link, useActionData, useSearchParams } from "@remix-run/react";
import * as React from "react";
import type { ActionFunction, LoaderFunction, MetaFunction } from "remix";
import {
Form,
json,
Link,
useActionData,
redirect,
useSearchParams,
} from "remix";

import { createUserSession, getUserId } from "~/session.server";
import { verifyLogin } from "~/models/user.server";
Expand Down
5 changes: 3 additions & 2 deletions app/routes/logout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ActionFunction, LoaderFunction } from "remix";
import { redirect } from "remix";
import type { ActionFunction, LoaderFunction } from "@remix-run/node";
import { redirect } from "@remix-run/node";

import { logout } from "~/session.server";

export const action: ActionFunction = async ({ request }) => {
Expand Down
5 changes: 3 additions & 2 deletions app/routes/notes.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Form, json, useLoaderData, Outlet, Link, NavLink } from "remix";
import type { LoaderFunction } from "remix";
import type { LoaderFunction } from "@remix-run/node";
import { json } from "@remix-run/node";
import { Form, Link, NavLink, Outlet, useLoaderData } from "@remix-run/react";

import { requireUserId } from "~/session.server";
import { useUser } from "~/utils";
Expand Down
7 changes: 4 additions & 3 deletions app/routes/notes/$noteId.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { LoaderFunction, ActionFunction } from "remix";
import { redirect } from "remix";
import { json, useLoaderData, useCatch, Form } from "remix";
import type { ActionFunction, LoaderFunction } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Form, useCatch, useLoaderData } from "@remix-run/react";
import invariant from "tiny-invariant";

import type { Note } from "~/models/note.server";
import { deleteNote } from "~/models/note.server";
import { getNote } from "~/models/note.server";
Expand Down
2 changes: 1 addition & 1 deletion app/routes/notes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from "remix";
import { Link } from "@remix-run/react";

export default function NoteIndexPage() {
return (
Expand Down
5 changes: 3 additions & 2 deletions app/routes/notes/new.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ActionFunction } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Form, useActionData } from "@remix-run/react";
import * as React from "react";
import { Form, json, redirect, useActionData } from "remix";
import type { ActionFunction } from "remix";

import { createNote } from "~/models/note.server";
import { requireUserId } from "~/session.server";
Expand Down
2 changes: 1 addition & 1 deletion app/session.server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createCookieSessionStorage, redirect } from "remix";
import { createCookieSessionStorage, redirect } from "@remix-run/node";
import invariant from "tiny-invariant";

import type { User } from "~/models/user.server";
Expand Down
2 changes: 1 addition & 1 deletion app/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMatches } from "@remix-run/react";
import { useMemo } from "react";
import { useMatches } from "remix";

import type { User } from "~/models/user.server";

Expand Down
13 changes: 1 addition & 12 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"dev:remix": "cross-env NODE_ENV=development binode --require ./mocks -- @remix-run/dev:remix dev",
"format": "prettier --write .",
"generate:css": "tailwindcss -o ./app/styles/tailwind.css",
"postinstall": "remix setup node",
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
"setup": "prisma migrate dev && prisma db seed",
"start": "remix-serve build",
Expand All @@ -33,13 +32,13 @@
],
"dependencies": {
"@prisma/client": "^3.11.1",
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/serve": "*",
"@remix-run/server-runtime": "*",
"bcryptjs": "^2.4.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"remix": "*",
"tiny-invariant": "^1.2.0"
},
"devDependencies": {
Expand Down

0 comments on commit 399001c

Please sign in to comment.