From 0e0b63bf5e92d037ce567a803f3c19750476d617 Mon Sep 17 00:00:00 2001 From: Edmund Hung Date: Tue, 24 May 2022 00:11:58 +0200 Subject: [PATCH] chore: stop relying on remix magic export --- app/components/About.tsx | 2 +- app/components/BackupForm.tsx | 2 +- app/components/BookmarkDetails.tsx | 2 +- app/components/Card.tsx | 2 +- app/components/Feed.tsx | 2 +- app/components/IconLink.tsx | 2 +- app/components/Progress.tsx | 2 +- app/components/ResourcesDetails.tsx | 2 +- app/components/ResourcesList.tsx | 2 +- app/components/SearchList.tsx | 2 +- app/components/ShowMoreButton.tsx | 2 +- app/components/SidebarNavigation.tsx | 2 +- app/entry.client.tsx | 2 +- app/entry.server.tsx | 4 ++-- app/hooks.ts | 2 +- app/root.tsx | 8 ++++---- app/routes/__layout.tsx | 6 ++++-- app/routes/__layout/$guide.$list.tsx | 12 ++++++++---- app/routes/__layout/$guide.$list/index.tsx | 7 ++++--- app/routes/__layout/$guide.tsx | 12 ++++++++---- app/routes/__layout/$guide/index.tsx | 7 ++++--- app/routes/__layout/admin.tsx | 4 ++-- app/routes/__layout/admin/pages.statistics.tsx | 5 +++-- app/routes/__layout/admin/pages.tsx | 5 +++-- app/routes/__layout/admin/resources.tsx | 5 +++-- app/routes/__layout/admin/users.$userId.backup.tsx | 5 +++-- app/routes/__layout/admin/users.tsx | 5 +++-- app/routes/__layout/resources/$resourceId.tsx | 4 ++-- app/routes/__layout/resources/index.tsx | 4 ++-- app/routes/__layout/submit.tsx | 5 +++-- app/routes/auth.tsx | 2 +- app/routes/index.tsx | 4 ++-- app/routes/login.tsx | 2 +- app/routes/logout.tsx | 2 +- app/routes/news.$list.tsx | 4 ++-- app/routes/news.tsx | 4 ++-- app/scroll.tsx | 2 +- package.json | 1 - worker/context/session.ts | 2 +- 39 files changed, 83 insertions(+), 66 deletions(-) diff --git a/app/components/About.tsx b/app/components/About.tsx index cd5f835..a6ee6aa 100644 --- a/app/components/About.tsx +++ b/app/components/About.tsx @@ -1,5 +1,5 @@ import type { ReactElement } from 'react'; -import { useMatches } from 'remix'; +import { useMatches } from '@remix-run/react'; import SvgIcon from '~/components/SvgIcon'; import logo from '~/icons/logo.svg'; diff --git a/app/components/BackupForm.tsx b/app/components/BackupForm.tsx index 52c5bde..542fcb3 100644 --- a/app/components/BackupForm.tsx +++ b/app/components/BackupForm.tsx @@ -1,5 +1,5 @@ import type { ReactElement } from 'react'; -import { Form } from 'remix'; +import { Form } from '@remix-run/react'; interface BackupFormProps { data: any; diff --git a/app/components/BookmarkDetails.tsx b/app/components/BookmarkDetails.tsx index 2945b9a..1831416 100644 --- a/app/components/BookmarkDetails.tsx +++ b/app/components/BookmarkDetails.tsx @@ -1,5 +1,5 @@ import { ReactElement, useMemo } from 'react'; -import { useLocation } from 'remix'; +import { useLocation } from '@remix-run/react'; import { PaneContainer, PaneHeader, PaneContent, PaneFooter } from '~/layout'; import IconLink from '~/components/IconLink'; import InputOption from '~/components/InputOption'; diff --git a/app/components/Card.tsx b/app/components/Card.tsx index c4e6682..963c3d4 100644 --- a/app/components/Card.tsx +++ b/app/components/Card.tsx @@ -1,4 +1,4 @@ -import { Link } from 'remix'; +import { Link } from '@remix-run/react'; import type { ReactElement } from 'react'; import type { Resource } from '~/types'; import { getSite, getResourceURL } from '~/search'; diff --git a/app/components/Feed.tsx b/app/components/Feed.tsx index de09ec6..f10ca67 100644 --- a/app/components/Feed.tsx +++ b/app/components/Feed.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; import { useMemo } from 'react'; -import { useLocation } from 'remix'; +import { useLocation } from '@remix-run/react'; import clsx from 'clsx'; import SearchList from '~/components/SearchList'; import ResourcesList from '~/components/ResourcesList'; diff --git a/app/components/IconLink.tsx b/app/components/IconLink.tsx index 730018d..ce11260 100644 --- a/app/components/IconLink.tsx +++ b/app/components/IconLink.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; import type { ComponentProps, ReactElement } from 'react'; -import { Link } from 'remix'; +import { Link } from '@remix-run/react'; import SvgIcon from '~/components/SvgIcon'; interface IconLinkProps { diff --git a/app/components/Progress.tsx b/app/components/Progress.tsx index a40b088..aa3ab03 100644 --- a/app/components/Progress.tsx +++ b/app/components/Progress.tsx @@ -1,6 +1,6 @@ import type { ReactElement, RefObject } from 'react'; import { useEffect, useRef } from 'react'; -import { useTransition } from 'remix'; +import { useTransition } from '@remix-run/react'; export function useProgress(): RefObject { const el = useRef(null); diff --git a/app/components/ResourcesDetails.tsx b/app/components/ResourcesDetails.tsx index ef92ac7..89fe30b 100644 --- a/app/components/ResourcesDetails.tsx +++ b/app/components/ResourcesDetails.tsx @@ -1,4 +1,4 @@ -import { Link, useLocation, useFetcher } from 'remix'; +import { Link, useLocation, useFetcher } from '@remix-run/react'; import type { ReactElement, ReactNode } from 'react'; import { useEffect, useMemo } from 'react'; import type { Resource } from '~/types'; diff --git a/app/components/ResourcesList.tsx b/app/components/ResourcesList.tsx index 91ebc45..e7b9f45 100644 --- a/app/components/ResourcesList.tsx +++ b/app/components/ResourcesList.tsx @@ -1,4 +1,4 @@ -import { Link, useLocation } from 'remix'; +import { Link, useLocation } from '@remix-run/react'; import Card from '~/components/Card'; import SvgIcon from '~/components/SvgIcon'; import searchIcon from '~/icons/search.svg'; diff --git a/app/components/SearchList.tsx b/app/components/SearchList.tsx index cd8178e..0a597c5 100644 --- a/app/components/SearchList.tsx +++ b/app/components/SearchList.tsx @@ -1,4 +1,4 @@ -import { Form, Link } from 'remix'; +import { Form, Link } from '@remix-run/react'; import { useRef, useState } from 'react'; import clsx from 'clsx'; import SvgIcon from '~/components/SvgIcon'; diff --git a/app/components/ShowMoreButton.tsx b/app/components/ShowMoreButton.tsx index d16923b..35b2d3b 100644 --- a/app/components/ShowMoreButton.tsx +++ b/app/components/ShowMoreButton.tsx @@ -1,4 +1,4 @@ -import { Link } from 'remix'; +import { Link } from '@remix-run/react'; import { useInView } from 'react-intersection-observer'; import { getResourceSearchParams } from '~/search'; import { SearchOptions } from '~/types'; diff --git a/app/components/SidebarNavigation.tsx b/app/components/SidebarNavigation.tsx index 4c711f4..8b09464 100644 --- a/app/components/SidebarNavigation.tsx +++ b/app/components/SidebarNavigation.tsx @@ -1,6 +1,6 @@ import type { ReactElement, ReactNode } from 'react'; import { useMemo } from 'react'; -import { Form, Link, NavLink, useLocation } from 'remix'; +import { Form, Link, NavLink, useLocation } from '@remix-run/react'; import clsx from 'clsx'; import SvgIcon from '~/components/SvgIcon'; import logo from '~/icons/logo.svg'; diff --git a/app/entry.client.tsx b/app/entry.client.tsx index 3900ed2..c330132 100644 --- a/app/entry.client.tsx +++ b/app/entry.client.tsx @@ -1,4 +1,4 @@ import ReactDOM from 'react-dom'; -import { RemixBrowser } from 'remix'; +import { RemixBrowser } from '@remix-run/react'; ReactDOM.hydrate(, document); diff --git a/app/entry.server.tsx b/app/entry.server.tsx index 88e536c..f2599f7 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -1,6 +1,6 @@ import ReactDOMServer from 'react-dom/server'; -import type { EntryContext } from 'remix'; -import { RemixServer } from 'remix'; +import type { EntryContext } from '@remix-run/cloudflare'; +import { RemixServer } from '@remix-run/react'; export default function handleRequest( request: Request, diff --git a/app/hooks.ts b/app/hooks.ts index b5628cf..6627491 100644 --- a/app/hooks.ts +++ b/app/hooks.ts @@ -1,4 +1,4 @@ -import { useMatches } from 'remix'; +import { useMatches } from '@remix-run/react'; import { GuideMetadata, SessionData } from '~/types'; export function useSessionData(): SessionData { diff --git a/app/root.tsx b/app/root.tsx index aa1cd3c..453c0c3 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -2,8 +2,9 @@ import type { LinksFunction, MetaFunction, LoaderFunction, - ShouldReloadFunction, -} from 'remix'; +} from '@remix-run/cloudflare'; +import { json } from '@remix-run/cloudflare'; +import type { ShouldReloadFunction } from '@remix-run/react'; import { Meta, Links, @@ -11,8 +12,7 @@ import { LiveReload, useCatch, Outlet, - json, -} from 'remix'; +} from '@remix-run/react'; import type { Context } from '~/types'; import stylesUrl from '~/styles/tailwind.css'; diff --git a/app/routes/__layout.tsx b/app/routes/__layout.tsx index 48b8743..ab2446a 100644 --- a/app/routes/__layout.tsx +++ b/app/routes/__layout.tsx @@ -1,5 +1,7 @@ -import type { LoaderFunction, ShouldReloadFunction } from 'remix'; -import { Outlet, json, useLoaderData, useLocation } from 'remix'; +import type { ShouldReloadFunction } from '@remix-run/react'; +import { Outlet, useLoaderData, useLocation } from '@remix-run/react'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { json } from '@remix-run/cloudflare'; import clsx from 'clsx'; import Progress from '~/components/Progress'; import SidebarNavigation from '~/components/SidebarNavigation'; diff --git a/app/routes/__layout/$guide.$list.tsx b/app/routes/__layout/$guide.$list.tsx index 2f67bd3..016fa8c 100644 --- a/app/routes/__layout/$guide.$list.tsx +++ b/app/routes/__layout/$guide.$list.tsx @@ -1,6 +1,8 @@ import { useMemo } from 'react'; -import type { LoaderFunction, ShouldReloadFunction } from 'remix'; -import { Outlet, useLoaderData, useLocation, json } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { json } from '@remix-run/cloudflare'; +import { Outlet, useLoaderData, useLocation } from '@remix-run/react'; +import type { ShouldReloadFunction } from '@remix-run/react'; import Feed from '~/components/Feed'; import { notFound } from '~/helpers'; import { search } from '~/resources'; @@ -50,8 +52,10 @@ export const unstable_shouldReload: ShouldReloadFunction = ({ }; export default function List() { - const { entries, count } = - useLoaderData<{ entries: Resource[]; count: number }>(); + const { entries, count } = useLoaderData<{ + entries: Resource[]; + count: number; + }>(); const location = useLocation(); const resourceId = useMemo(() => { const searchParams = new URLSearchParams(location.search); diff --git a/app/routes/__layout/$guide.$list/index.tsx b/app/routes/__layout/$guide.$list/index.tsx index 74649e7..78c2ce9 100644 --- a/app/routes/__layout/$guide.$list/index.tsx +++ b/app/routes/__layout/$guide.$list/index.tsx @@ -1,10 +1,11 @@ import type { LoaderFunction, ActionFunction, - ShouldReloadFunction, MetaFunction, -} from 'remix'; -import { Form, useLocation, useLoaderData, json, redirect } from 'remix'; +} from '@remix-run/cloudflare'; +import { json, redirect } from '@remix-run/cloudflare'; +import type { ShouldReloadFunction } from '@remix-run/react'; +import { Form, useLocation, useLoaderData } from '@remix-run/react'; import { useMemo } from 'react'; import clsx from 'clsx'; import About from '~/components/About'; diff --git a/app/routes/__layout/$guide.tsx b/app/routes/__layout/$guide.tsx index 4920555..a777622 100644 --- a/app/routes/__layout/$guide.tsx +++ b/app/routes/__layout/$guide.tsx @@ -1,6 +1,8 @@ import { useMemo } from 'react'; -import type { LoaderFunction, ShouldReloadFunction } from 'remix'; -import { Outlet, useLoaderData, useLocation, json, redirect } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { json, redirect } from '@remix-run/cloudflare'; +import { Outlet, useLoaderData, useLocation } from '@remix-run/react'; +import type { ShouldReloadFunction } from '@remix-run/react'; import Feed from '~/components/Feed'; import { notFound } from '~/helpers'; import { search } from '~/resources'; @@ -42,8 +44,10 @@ export const unstable_shouldReload: ShouldReloadFunction = ({ }; export default function List() { - const { entries, count } = - useLoaderData<{ entries: Resource[]; count: number }>(); + const { entries, count } = useLoaderData<{ + entries: Resource[]; + count: number; + }>(); const location = useLocation(); const resourceId = useMemo(() => { const searchParams = new URLSearchParams(location.search); diff --git a/app/routes/__layout/$guide/index.tsx b/app/routes/__layout/$guide/index.tsx index 740ec2e..7902873 100644 --- a/app/routes/__layout/$guide/index.tsx +++ b/app/routes/__layout/$guide/index.tsx @@ -1,10 +1,11 @@ import type { ActionFunction, LoaderFunction, - ShouldReloadFunction, MetaFunction, -} from 'remix'; -import { Form, useLoaderData, useLocation, json, redirect } from 'remix'; +} from '@remix-run/cloudflare'; +import { json, redirect } from '@remix-run/cloudflare'; +import type { ShouldReloadFunction } from '@remix-run/react'; +import { Form, useLoaderData, useLocation } from '@remix-run/react'; import { useMemo } from 'react'; import clsx from 'clsx'; import About from '~/components/About'; diff --git a/app/routes/__layout/admin.tsx b/app/routes/__layout/admin.tsx index ce5d9ee..19648e1 100644 --- a/app/routes/__layout/admin.tsx +++ b/app/routes/__layout/admin.tsx @@ -1,5 +1,5 @@ -import type { LoaderFunction } from 'remix'; -import { Outlet, useLoaderData, useLocation } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { Outlet, useLoaderData, useLocation } from '@remix-run/react'; import { useMemo } from 'react'; import menuIcon from '~/icons/menu.svg'; import FlashMessage from '~/components/FlashMessage'; diff --git a/app/routes/__layout/admin/pages.statistics.tsx b/app/routes/__layout/admin/pages.statistics.tsx index 6dbfbc8..94cd907 100644 --- a/app/routes/__layout/admin/pages.statistics.tsx +++ b/app/routes/__layout/admin/pages.statistics.tsx @@ -1,5 +1,6 @@ -import type { ActionFunction } from 'remix'; -import { json, useActionData, redirect } from 'remix'; +import type { ActionFunction } from '@remix-run/cloudflare'; +import { json, redirect } from '@remix-run/cloudflare'; +import { useActionData } from '@remix-run/react'; import { requireAdministrator } from '~/helpers'; import BackupForm from '~/components/BackupForm'; import type { Context } from '~/types'; diff --git a/app/routes/__layout/admin/pages.tsx b/app/routes/__layout/admin/pages.tsx index 037981b..0c3a3ad 100644 --- a/app/routes/__layout/admin/pages.tsx +++ b/app/routes/__layout/admin/pages.tsx @@ -1,5 +1,6 @@ -import { LoaderFunction, ActionFunction, Link } from 'remix'; -import { Form, useLoaderData, useLocation, json, redirect } from 'remix'; +import type { LoaderFunction, ActionFunction } from '@remix-run/cloudflare'; +import { json, redirect } from '@remix-run/cloudflare'; +import { Link, Form, useLoaderData, useLocation } from '@remix-run/react'; import { requireAdministrator } from '~/helpers'; import { getSite } from '~/search'; import type { Context, PageMetadata } from '~/types'; diff --git a/app/routes/__layout/admin/resources.tsx b/app/routes/__layout/admin/resources.tsx index 9886b5b..14ced78 100644 --- a/app/routes/__layout/admin/resources.tsx +++ b/app/routes/__layout/admin/resources.tsx @@ -1,5 +1,6 @@ -import type { ActionFunction } from 'remix'; -import { json, useActionData, redirect } from 'remix'; +import type { ActionFunction } from '@remix-run/cloudflare'; +import { json, redirect } from '@remix-run/cloudflare'; +import { useActionData } from '@remix-run/react'; import { requireAdministrator } from '~/helpers'; import BackupForm from '~/components/BackupForm'; import type { Context } from '~/types'; diff --git a/app/routes/__layout/admin/users.$userId.backup.tsx b/app/routes/__layout/admin/users.$userId.backup.tsx index dbe6993..199d9ab 100644 --- a/app/routes/__layout/admin/users.$userId.backup.tsx +++ b/app/routes/__layout/admin/users.$userId.backup.tsx @@ -1,5 +1,6 @@ -import type { ActionFunction } from 'remix'; -import { json, useActionData, redirect } from 'remix'; +import type { ActionFunction } from '@remix-run/cloudflare'; +import { json, redirect } from '@remix-run/cloudflare'; +import { useActionData } from '@remix-run/react'; import { requireAdministrator, notFound } from '~/helpers'; import BackupForm from '~/components/BackupForm'; import type { Context } from '~/types'; diff --git a/app/routes/__layout/admin/users.tsx b/app/routes/__layout/admin/users.tsx index 7c73b6d..3db005d 100644 --- a/app/routes/__layout/admin/users.tsx +++ b/app/routes/__layout/admin/users.tsx @@ -1,5 +1,6 @@ -import type { LoaderFunction } from 'remix'; -import { Link, useLoaderData, json } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { json } from '@remix-run/cloudflare'; +import { Link, useLoaderData } from '@remix-run/react'; import { requireAdministrator } from '~/helpers'; import type { Context, UserProfile } from '~/types'; diff --git a/app/routes/__layout/resources/$resourceId.tsx b/app/routes/__layout/resources/$resourceId.tsx index 5af9eb8..71aacab 100644 --- a/app/routes/__layout/resources/$resourceId.tsx +++ b/app/routes/__layout/resources/$resourceId.tsx @@ -1,5 +1,5 @@ -import type { LoaderFunction } from 'remix'; -import { redirect } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { redirect } from '@remix-run/cloudflare'; import { getRelatedSearchParams } from '~/search'; export let loader: LoaderFunction = async ({ request, params }) => { diff --git a/app/routes/__layout/resources/index.tsx b/app/routes/__layout/resources/index.tsx index aea5bfe..4c95788 100644 --- a/app/routes/__layout/resources/index.tsx +++ b/app/routes/__layout/resources/index.tsx @@ -1,5 +1,5 @@ -import type { LoaderFunction } from 'remix'; -import { redirect } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { redirect } from '@remix-run/cloudflare'; import { getRelatedSearchParams } from '~/search'; export let loader: LoaderFunction = async ({ request }) => { diff --git a/app/routes/__layout/submit.tsx b/app/routes/__layout/submit.tsx index 1c81095..02b784f 100644 --- a/app/routes/__layout/submit.tsx +++ b/app/routes/__layout/submit.tsx @@ -1,5 +1,6 @@ -import type { MetaFunction, ActionFunction } from 'remix'; -import { Form, redirect, useLocation } from 'remix'; +import type { MetaFunction, ActionFunction } from '@remix-run/cloudflare'; +import { redirect } from '@remix-run/cloudflare'; +import { Form, useLocation } from '@remix-run/react'; import { useMemo } from 'react'; import menuIcon from '~/icons/menu.svg'; import FlashMessage from '~/components/FlashMessage'; diff --git a/app/routes/auth.tsx b/app/routes/auth.tsx index 075e907..9ac3f78 100644 --- a/app/routes/auth.tsx +++ b/app/routes/auth.tsx @@ -1,4 +1,4 @@ -import type { LoaderFunction } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; export let loader: LoaderFunction = async ({ context }) => { return await context.session.login(); diff --git a/app/routes/index.tsx b/app/routes/index.tsx index 899b65d..c3d376a 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -1,5 +1,5 @@ -import type { LoaderFunction, MetaFunction } from 'remix'; -import { redirect } from 'remix'; +import type { LoaderFunction, MetaFunction } from '@remix-run/cloudflare'; +import { redirect } from '@remix-run/cloudflare'; import { formatMeta } from '~/helpers'; export let meta: MetaFunction = () => { diff --git a/app/routes/login.tsx b/app/routes/login.tsx index 6907818..497c331 100644 --- a/app/routes/login.tsx +++ b/app/routes/login.tsx @@ -1,4 +1,4 @@ -import type { LoaderFunction, ActionFunction } from 'remix'; +import type { LoaderFunction, ActionFunction } from '@remix-run/cloudflare'; import { notFound } from '~/helpers'; export let loader: LoaderFunction = async ({ context }) => { diff --git a/app/routes/logout.tsx b/app/routes/logout.tsx index ed3f25e..860c954 100644 --- a/app/routes/logout.tsx +++ b/app/routes/logout.tsx @@ -1,4 +1,4 @@ -import type { ActionFunction, LoaderFunction } from 'remix'; +import type { ActionFunction, LoaderFunction } from '@remix-run/cloudflare'; import { notFound } from '~/helpers'; export let action: ActionFunction = async ({ context }) => { diff --git a/app/routes/news.$list.tsx b/app/routes/news.$list.tsx index 80702ca..510af94 100644 --- a/app/routes/news.$list.tsx +++ b/app/routes/news.$list.tsx @@ -1,5 +1,5 @@ -import type { LoaderFunction } from 'remix'; -import { redirect } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { redirect } from '@remix-run/cloudflare'; export let loader: LoaderFunction = ({ params }) => { throw redirect(`/discover/${params.list}`); diff --git a/app/routes/news.tsx b/app/routes/news.tsx index a7610d8..b656852 100644 --- a/app/routes/news.tsx +++ b/app/routes/news.tsx @@ -1,5 +1,5 @@ -import type { LoaderFunction } from 'remix'; -import { redirect } from 'remix'; +import type { LoaderFunction } from '@remix-run/cloudflare'; +import { redirect } from '@remix-run/cloudflare'; export let loader: LoaderFunction = () => { throw redirect('/discover'); diff --git a/app/scroll.tsx b/app/scroll.tsx index 3c78331..4312c96 100644 --- a/app/scroll.tsx +++ b/app/scroll.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useLayoutEffect, useRef } from 'react'; -import { useBeforeUnload, useLocation, useTransition } from 'remix'; +import { useBeforeUnload, useLocation, useTransition } from '@remix-run/react'; let STORAGE_KEY = 'feed-positions'; diff --git a/package.json b/package.json index 6bf0c81..389c3f7 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "dev:remix": "remix watch", "dev:style": "tailwindcss -o ./app/styles/tailwind.css --watch", "dev": "concurrently \"npm:dev:*\"", - "postinstall": "remix setup cloudflare", "prebuild": "npm run cleanup", "test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" playwright test", "start": "miniflare", diff --git a/worker/context/session.ts b/worker/context/session.ts index 296a8b9..6ca8ae8 100644 --- a/worker/context/session.ts +++ b/worker/context/session.ts @@ -1,6 +1,6 @@ import { Authenticator } from 'remix-auth'; import { GitHubStrategy } from 'remix-auth-github'; -import { createCookieSessionStorage, redirect } from 'remix'; +import { createCookieSessionStorage, redirect } from '@remix-run/cloudflare'; import type { Env, MessageType, SessionData, UserProfile } from '../types'; import { getUserStore } from '../store/UserStore';