Skip to content

Commit

Permalink
docs(tutorials/jokes): remove unused imports (remix-run#5842)
Browse files Browse the repository at this point in the history
  • Loading branch information
arifqys committed Mar 19, 2023
1 parent db60b2e commit a0341c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -507,3 +507,4 @@
- zainfathoni
- zayenz
- zhe
- arifqys
22 changes: 7 additions & 15 deletions docs/tutorials/jokes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1801,8 +1801,7 @@ const [randomJoke] = await db.joke.findMany({

<summary>app/routes/jokes/index.tsx</summary>

```tsx filename=app/routes/jokes/index.tsx lines=[5,7-15,18]
import type { LoaderArgs } from "@remix-run/node";
```tsx filename=app/routes/jokes/index.tsx lines=[1-2,4,6-14,17]
import { json } from "@remix-run/node";
import { useLoaderData, Link } from "@remix-run/react";

Expand Down Expand Up @@ -2518,12 +2517,11 @@ Great, now that we've got the UI looking nice, let's add some logic. This will b

<summary>app/routes/login.tsx</summary>

```tsx filename=app/routes/login.tsx lines=[2,5,8,13-14,20-24,26-30,32-38,40-112,115,138-141,150-153,164-172,174-182,190-198,200-208,210-219]
```tsx filename=app/routes/login.tsx lines=[2,7,12-13,19-23,25-29,31-37,39-111,114,137-140,149-152,163-171,173-181,189-197,199-207,209-218]
import type {
ActionArgs,
LinksFunction,
} from "@remix-run/node";
import { json } from "@remix-run/node";
import {
Link,
useActionData,
Expand Down Expand Up @@ -3133,7 +3131,7 @@ You may also notice that our solution makes use of the `login` route's `redirect

```tsx filename=app/routes/jokes/new.tsx lines=[7,22,51]
import type { ActionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useActionData } from "@remix-run/react";

import { db } from "~/utils/db.server";
Expand Down Expand Up @@ -3505,10 +3503,7 @@ export default function JokesRoute() {
<summary>app/routes/logout.tsx</summary>

```tsx filename=app/routes/logout.tsx
import type {
ActionArgs,
LoaderArgs,
} from "@remix-run/node";
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";

import { logout } from "~/utils/session.server";
Expand Down Expand Up @@ -3687,12 +3682,11 @@ export async function createUserSession(

<summary>app/routes/login.tsx</summary>

```tsx filename=app/routes/login.tsx lines=[18,102-110]
```tsx filename=app/routes/login.tsx lines=[17,101-109]
import type {
ActionArgs,
LinksFunction,
} from "@remix-run/node";
import { json } from "@remix-run/node";
import {
Link,
useActionData,
Expand Down Expand Up @@ -5011,13 +5005,12 @@ export default function IndexRoute() {

<summary>app/routes/login.tsx</summary>

```tsx filename=app/routes/login.tsx lines=[4,22-25]
```tsx filename=app/routes/login.tsx lines=[4,21-24]
import type {
ActionArgs,
LinksFunction,
MetaFunction,
} from "@remix-run/node";
import { json } from "@remix-run/node";
import {
Link,
useActionData,
Expand Down Expand Up @@ -5747,15 +5740,14 @@ export function JokeDisplay({

<summary>app/routes/jokes/$jokeId.tsx</summary>

```tsx filename=app/routes/jokes/$jokeId.tsx lines=[14,89]
```tsx filename=app/routes/jokes/$jokeId.tsx lines=[13,88]
import type {
ActionArgs,
LoaderArgs,
MetaFunction,
} from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import {
Link,
useCatch,
useLoaderData,
useParams,
Expand Down

0 comments on commit a0341c9

Please sign in to comment.