Skip to content

Commit

Permalink
upgrade everything and migrate to remix Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilDL committed Feb 22, 2024
1 parent 29f536a commit 6f70a1b
Show file tree
Hide file tree
Showing 100 changed files with 5,775 additions and 5,720 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"8b46bd2f9b30011f045c7373cf44b5eecb3eba03e81b0b017bcdca44e7a8f43a","exports":["ErrorBoundary","default","loader","meta"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"a216bd7b51e14e62184bb81cda994cb4e668613c9c95c39d8179d790902ebc7d","exports":["action","default","loader","meta"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"1381b7a36d5f5ab7bd2045254b37de0de75365b79a72175f8ad1b847f90f2d09","exports":["default","links","loader","meta","shouldRevalidate"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"a41dd9c109c75f8198139b3536237c1861197883ec1d49076d10279c8870cc79","exports":["action","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"3b554af74f6c8d29008ccce105af1ca9c6fd7b47fe992d2855589c3e4680e138","exports":["action","default","loader","meta"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"0d749fb2215057f4473b06cd397673c2dc69347a7d61b00a575ab469ddd20059","exports":["action","default","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"a95f4f170e98a1a7bda71decc53ca1ad29a89fc553588a4fab8786b2f6a00e75","exports":["action"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"a9cb89d1ba9b08e84e3294041bb960c25d74e92b4d2b6f28c350b3b1481ba81d","exports":["ErrorBoundary","default","loader","meta"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"710fd027c8d06114a361ae87a412b5ac0b4a5bc4dcb60d6cca82e55728eee675","exports":["TierCard","action","default","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"42ad5af890ba520eb50b18d1ec8ba8a02f7f18cb02e1bb3b2c8d51607cbf801b","exports":["action"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"3d2c8da4c436e33c19a1906f8294a79a8591c1a17996051218f72db9a93315f7","exports":["loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"a776850641834d705599d3c46177311d8330b379b032f0ea7220621b91b1d70a","exports":["ErrorBoundary","default","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"bc6d0cafcbf4fc0f6051770f06687677b5bac9ab9c090dbcc74d3f223d26db7c","exports":["default","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"41acfecb91dcbb2f896555012fce296d46a3ea2dc1b5236fa86a41f0789883a6","exports":["default","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"cfb1a74543a04668f8d53544b1c6bb8d2e20c06205311adb6ffb2ea1386efa89","exports":["loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"7885e8313df4a17f94fa66dc3b1a65c95b429a88dad3e501bbf053fcf131a250","exports":["loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"764a06f4827c2aecda02b2642d1f8206898d357961950dd0c54fef5b961189d8","exports":["default","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"6a21a82dfa5fa6b159b9cb1e39648abb9afbfed5ab09a74181f46002c4d78dc6","exports":["action","default"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"0e6ab70f31cf26335976124a4afc79dc2fbe9cb53ec522054e96c8ab6d50951f","exports":["default","loader","meta","shouldRevalidate"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"ca63e623cd3ef8153e9af00e069b3f9f66716d3f5e1dd7245392175c14af8cfc","exports":["default","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"f8f53863e7afb96121d2891eb2e60cd6513f8f80e28fe0f047d95935d4ce7493","exports":["loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"aacd408589702b40aee4b4ae7bd4235107a7e88261f766bdc83892ae85c3b5f7","exports":["action","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"70658ae3002e01bba4d6efaae9e3988346710d9956b1d43c7d355846f081a49e","exports":["action","loader"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

1863ff7534a8d1ab30dbe5409346fc04144d1e7e {"key":"routes/_blog._index.exports","integrity":"sha512-hq7xhpgKrqnDiIyuP7bW9r1SgkLvoBZ4R5BqEzoMN8XLflH/9Thnuf3PAdC7s5jF7ZgwVif4U4bWKr8ufJtHhQ==","time":1708607168321,"size":106}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

e7887d789dcb4ab4fbab5b9fc6eec7b3baab57f4 {"key":"routes/_blog.tags.exports","integrity":"sha512-XIW9BwxkkdOAdIPLCgr1OkwhH5uBDagLnMnjKielqoSzkCXP9wtoXgQpiTOVy+7FH/DfzhzKBw6c0/Tdu1Ekkg==","time":1708607168322,"size":106}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

2bca66df803f11e5c244a453458d8fcb6d0bdb85 {"key":"routes/_blog.logout.exports","integrity":"sha512-HjvaUXyahzxLrK6R7tCCg+igAtWFCJOMSUyAVBS0JPA5afN+VbPCcTTWPEK5rJ0fyFlXTkh3ooNWRdp89ZKy/w==","time":1708607168323,"size":105}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

c52f6b1423f2d6d94a01d3102f1aa0b4136dbe20 {"key":"routes/action.set-theme.exports","integrity":"sha512-w7j/lXnm9siVLypONOBS9nE9p2PR5IenE7lMzKHHUAYwQtfsfWKgGaNVFAYUtaxoJNyqVsO93OrgsCzI1KzvrQ==","time":1708607168322,"size":105}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

9d41cb6f43f433e94b160026bcfd43d63c567efd {"key":"routes/_blog.exports","integrity":"sha512-kUhzqM0D1mdLLyasQRx+soGlu4kst5KP4FYVnoiIcBuvv48BJyWhAW+wz+CVt4FIjdmaWGOip9BxcRr/14hDkg==","time":1708607168323,"size":132}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

b81d8dc9ca7de5492004ca4fc35bdba6f62d34c9 {"key":"routes/_blog.author.$slug.exports","integrity":"sha512-TCVTFgDSVO4RXsAyuQw4RDIpYz1Gs9LZ7BZDIRbXZpllLD/CGSb0uAZMrwG3EGQlEurK9iGqGK5V+Np77CjsYg==","time":1708607168316,"size":122}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

796452082aff72e479e2127c2ceb8f759880a243 {"key":"routes/healthcheck.exports","integrity":"sha512-gFswLzbGmJXDi0WmBpr9qZX+gF2hccJgdFYwNMNntlQM1RAjpjsm5cBWvxK82AUeJW05Sttx2K8BS85V5u967w==","time":1708607168323,"size":96}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

141564dade65611b72b061a24a1484c45b730890 {"key":"routes/_blog.checkout.exports","integrity":"sha512-rjleAzG26n0iTovZUGrdqEd0RgcLdB18k0J3+T5m9A3dWtRGFOaUGZF5UeeLKSwqaF6VzI7pQBrn+RWo4dS1Bg==","time":1708607168322,"size":106}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

a19b19e23be15501a9304fbfdd9459e7d724bfe2 {"key":"routes/robots[.]txt.exports","integrity":"sha512-sARNDJHNe1vNcI+cb8FIAdKGn8k3qbjKaI5CccrMcnYNpd9a0iDAVs70lJwRuI53fsu9xntBQi6JnNmPGHSn0w==","time":1708607168322,"size":96}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

1e5e79f740cf17737783e4c90dd4917895683467 {"key":"routes/_blog.account.exports","integrity":"sha512-PauHdNeNtII6OBg6RAWAuO1R78obQLkeo0cpMUBSPqODiZQrNQnno4f9DJ0p5Rnz9tk9edWsGVU5sobQ0JYAZQ==","time":1708607168342,"size":126}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

3b296164cef7f6cbab714ba2414f3219f24054ae {"key":"routes/_blog.$slug.exports","integrity":"sha512-OUueBW1hU9gn0xNfxaVlKq9CBNhv9YyV56jUqjjOkY2XB/r/f92UW9rsBF2oDo0pTzBMyAFzvIDmD7R+JeiKNg==","time":1708607168343,"size":129}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

8d9bf615d69c14a8e58554e0ab2b582f11a2f62b {"key":"routes/_blog.welcome.exports","integrity":"sha512-Mtv7IW0Gyo3TE6a/RA5dyQ0t/dtC1pXktVnhyCQwK/zB69I6uQyfz5M84EyJTvCIJLLUSfgjEpzyYfNMv6V+tA==","time":1708607168322,"size":115}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

69716af530be448ac082d259422ef4ab098f23ca {"key":"routes/_blog.authors.exports","integrity":"sha512-TkX6Dn3mN+QzK2B8PJ0zXg2bK8aaKFVPsLx+gpB6G/XZCkLwjvsZGL7ES/tVNCZPIDvVxjJCn7YIjkox2G31hQ==","time":1708607168320,"size":106}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

098cec0ffd14c675a93bcab801e487348854836e {"key":"routes/_blog.magic-link.exports","integrity":"sha512-bkn8FoMz43bSF1+oUqwi+OSTSpcShzS7FsImUsuv88zCMFNdnQ9GeZ0GFHdXYSji2al6W0DwKq58YF5n9AIc5g==","time":1708607168317,"size":96}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

97c51030b7d9989e47c33ea37c5765dff6c8d949 {"key":"routes/action.command.exports","integrity":"sha512-Q92M0izlcaioDoBqMorpowxYDoIunrzcD2DIbZhk6+O76GOP2JWLH67X2FW+glEnWnOf+1IgIz6cig7falc30w==","time":1708607168320,"size":96}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

478b47f638ee42f2f4204d01dba2b05d103121cf {"key":"routes/webhooks.stripe.exports","integrity":"sha512-M7u1QxOGdM3oetlew6ZC4Czd5S2+Pxkmb/y9BoKuxYoj+P+3xmkvnAANIAOy/Ag+1FrwpYiD5B9geifvn7S4Og==","time":1708607168325,"size":96}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

02f8bfa5035093698671e2b2004514cdaedfead9 {"key":"routes/_blog.tag.$slug.exports","integrity":"sha512-BWO+Bge+xuA3KEHNg/srbMceiYA+f52QZUHnSxIsbXhTuPmre2lLI1b1sdtp2E2c1a4BKmLvdVG7xrkkWToqHg==","time":1708607168321,"size":129}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

94741012ffaeba4820b69e6b5b262f2830a1d274 {"key":"routes/_blog.contact.exports","integrity":"sha512-irvK5wlPiUDc0IYAaEhrKpnCk9tgAsFRznESDQti8B398kskW6Murud6v0TwAU9qzRKzcPLYrJwn2+sG7kIrVw==","time":1708607168317,"size":106}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

b886c81b8a6818bc76954d1fc83dc9796c2e4bbf {"key":"routes/_blog.blog.load-more-posts.exports","integrity":"sha512-QXiSOL+/mKUceaTLzpOk0ZtN9MZIxKOXRCyNEDbo5QETv7dtxCsUXYd6Ds0cYefojZho8XMFfiUr3msUHcJu+w==","time":1708607168321,"size":96}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

66ac44c2998e6ecd8de9f3a9a5caced0de552bec {"key":"root.exports","integrity":"sha512-DRnYg6rVa4vWYf+yH+aZd2vXZtYvWKovKYTCEWE5XcH3R/05vUoUlHcmN2tc5RqS4OzyIrKKnylY6EK8DKminA==","time":1708607168320,"size":140}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

022582c5bab33a8737a5594d11436dc6d4f9f2a9 {"key":"routes/_blog.join.exports","integrity":"sha512-IUTJOkRT0SXHrzbjeofNFkPOB3goed2ws+/SdLvasvuEG9yv0BVrvQpq3VHyNG8pqCkvT1ULlpcepiEETixdgw==","time":1708607168323,"size":122}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

bd18844fc507cde7b333cf86fa38c2882c19abdc {"key":"routes/api.stripe.create-customer-portal.exports","integrity":"sha512-06qTfjBJOybOe9a2pPbWZ16XkZv/U8cOFc4ehSvcDZJd0at9vOgVPmu3DDqj8FuRRn7SBsyUmEchpxzCadox+g==","time":1708607168317,"size":105}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

bbafcc8fba5ac208ccc912e93d5992b2776f1ec5 {"key":"routes/_blog.login.exports","integrity":"sha512-CrbLM8Ps1IdhMy5STmeDoQZWugH9HNs61sCc5oFuem4gQMfcJvXzoH26pImKyikWjUocUsxWHKtGRXhkCC3Plw==","time":1708607168324,"size":122}
File renamed without changes.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.format": true
"source.fixAll.eslint": "explicit",
"source.fixAll.format": "explicit"
},
"editor.wordWrap": "on",
"[prisma]": {
Expand Down
6 changes: 3 additions & 3 deletions app/entry.server.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PassThrough } from "stream";
import { Response, type EntryContext } from "@remix-run/node";
import { createReadableStreamFromReadable, type EntryContext } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import isbot from "isbot";
import {isbot} from "isbot";

import { renderToPipeableStream } from "react-dom/server";

Expand Down Expand Up @@ -29,7 +29,7 @@ export default function handleRequest(
responseHeaders.set("Content-Type", "text/html");

resolve(
new Response(body, {
new Response(createReadableStreamFromReadable(body), {
headers: responseHeaders,
status: didError ? 500 : responseStatusCode,
})
Expand Down
1 change: 1 addition & 0 deletions app/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const env = createEnv({
GHOST_CONTENT_API_KEY: z.string().min(1),
GHOST_ADMIN_API_KEY: z.string().min(1),
MAGIC_LINK_SECRET: z.string().min(1),
ADMIN_SESSION_SECRET: z.string().min(1),
SESSION_SECRET: z.string().min(1),
STRIPE_PUBLIC_KEY: z.string().optional(),
STRIPE_SECRET_KEY: z.string().min(1),
Expand Down
18 changes: 8 additions & 10 deletions app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import fontStylesheet from "./styles/fonts.css";
import nordthemeStylesheet from "./styles/nordtheme.css";
import tailwindStylesheetUrl from "./styles/tailwind.css";
import fontStylesheet from "./styles/fonts.css?url";
import nordthemeStylesheet from "./styles/nordtheme.css?url";
import tailwindStylesheetUrl from "./styles/tailwind.css?url";
import {
json,
type LinksFunction,
type LoaderArgs,
type V2_MetaFunction,
type LoaderFunctionArgs,
type MetaFunction,
} from "@remix-run/node";
import {
Links,
LiveReload,
Meta,
Outlet,
Scripts,
Expand All @@ -23,7 +22,7 @@ import {
useTheme,
} from "~/ui/utils/theme-provider";
import clsx from "clsx";
import { ClientOnly } from "remix-utils";
import { ClientOnly } from "remix-utils/client-only";

import { Toaster } from "~/ui/components/toaster";

Expand All @@ -42,11 +41,11 @@ export const links: LinksFunction = () => {
];
};

export const meta: V2_MetaFunction = () => [
export const meta: MetaFunction = () => [
{ title: "Remix Ghost Stack - Remix App with Ghost CMS in Headless Mode" },
];

export async function loader({ request }: LoaderArgs) {
export async function loader({ request }: LoaderFunctionArgs) {
const themeSession = await getThemeSession(request);
return json({
theme: themeSession.getTheme(),
Expand All @@ -70,7 +69,6 @@ function App() {
<ScrollRestoration />
<Scripts />
<ClientOnly>{() => <Toaster />}</ClientOnly>
<LiveReload />
</body>
</html>
);
Expand Down
6 changes: 3 additions & 3 deletions app/routes/_blog.$slug.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { json, type LoaderArgs, type V2_MetaFunction } from "@remix-run/node";
import { json, type LoaderFunctionArgs, type MetaFunction } from "@remix-run/node";
import {
isRouteErrorResponse,
Link,
Expand All @@ -17,7 +17,7 @@ import { PostSubscribeCTA } from "~/ui/components/subscribe-overlay";
import { getPostOrPage } from "~/domain/get-post-or-page.server";
import { auth } from "~/services/auth.server";

export const meta: V2_MetaFunction<
export const meta: MetaFunction<
typeof loader,
{ "routes/_blog": typeof rootBlogLoader }
> = ({ data, matches, location, params }) => {
Expand Down Expand Up @@ -154,7 +154,7 @@ export const meta: V2_MetaFunction<
];
};

export async function loader({ request, params }: LoaderArgs) {
export async function loader({ request, params }: LoaderFunctionArgs) {
const res = await getPostOrPage(
{
slug: params.slug,
Expand Down
4 changes: 2 additions & 2 deletions app/routes/_blog._index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { json, type LoaderArgs } from "@remix-run/node";
import { json, type LoaderFunctionArgs } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";

import { AuthorsSection } from "~/ui/components/authors/authors-section";
Expand All @@ -13,7 +13,7 @@ import { TagsSection } from "~/ui/components/tags/tags-section";
import { auth } from "~/services/auth.server";
import { cachedGetIndexPageData } from "~/services/ghost.server";

export async function loader({ request }: LoaderArgs) {
export async function loader({ request }: LoaderFunctionArgs) {
const user = await auth.isAuthenticated(request);
const { settings, posts, tags, featuredPosts, authors, postsMeta } =
await cachedGetIndexPageData();
Expand Down
16 changes: 8 additions & 8 deletions app/routes/_blog.account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
json,
redirect,
type ActionFunction,
type LoaderArgs,
type LoaderFunctionArgs,
} from "@remix-run/node";
import {
Form,
Expand All @@ -12,7 +12,7 @@ import {
} from "@remix-run/react";
import type { Tier } from "@ts-ghost/content-api";
import { CheckCircle, GemIcon } from "lucide-react";
import { AuthenticityTokenInput, verifyAuthenticityToken } from "remix-utils";
import { AuthenticityTokenInput } from "remix-utils/csrf/react";
import type Stripe from "stripe";
import invariant from "tiny-invariant";

Expand All @@ -34,11 +34,11 @@ import {
getMember,
getMemberActiveSubscriptions,
} from "~/services/ghost.server";
import { getSession } from "~/services/session.server";
import { createCheckoutSession } from "~/services/stripe/checkout.server";
import { getProductAndPriceByName } from "~/services/stripe/products.server";
import { csrf } from "~/services/csrf.server";

export let loader = async ({ request }: LoaderArgs) => {
export let loader = async ({ request }: LoaderFunctionArgs) => {
// If the user is here, it's already authenticated, if not redirect them to
// the login page.
const userSession = await auth.isAuthenticated(request, {
Expand All @@ -61,7 +61,7 @@ export let loader = async ({ request }: LoaderArgs) => {
export const action: ActionFunction = async ({ request }) => {
const formData = await request.clone().formData();
// CSRF Protection
await verifyAuthenticityToken(formData, await getSession(request));
await csrf.validate(formData, request.headers);

const user = await auth.isAuthenticated(request, {
failureRedirect: "/login",
Expand Down Expand Up @@ -119,7 +119,7 @@ export const TierCard = ({
<ul className="ml-4 mt-3 text-sm">
{tier.benefits.map((benefit, index) => (
<li key={index} className="flex flex-row items-center">
<CheckCircle className="mr-2 h-3 w-3 " />
<CheckCircle className="mr-2 size-3 " />
{benefit}
</li>
))}
Expand All @@ -136,7 +136,7 @@ export const TierCard = ({
<Form
method="post"
key={price.id}
className="flex h-full w-full flex-col items-end justify-between gap-3"
className="flex size-full flex-col items-end justify-between gap-3"
>
<AuthenticityTokenInput />
<input type="hidden" name="priceId" value={price.id} />
Expand Down Expand Up @@ -197,7 +197,7 @@ export default function Account() {
.filter((sub) => sub.status === "active")
.map((sub) => (
<Badge key={sub.id}>
<GemIcon className="mr-1 h-3 w-3" />
<GemIcon className="mr-1 size-3" />
{sub.tier?.name}
</Badge>
))}
Expand Down
6 changes: 3 additions & 3 deletions app/routes/_blog.author.$slug.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { json, type LoaderArgs } from "@remix-run/node";
import { json, type LoaderFunctionArgs } from "@remix-run/node";
import {
isRouteErrorResponse,
useLoaderData,
Expand All @@ -10,7 +10,7 @@ import { PostsList } from "~/ui/components/posts/posts-list";

import { getAuthorPage } from "~/services/ghost.server";

export async function loader({ request, params }: LoaderArgs) {
export async function loader({ request, params }: LoaderFunctionArgs) {
let slug = params.slug;
invariant(slug, "Slug is required");
const { posts, author, postsMeta } = await getAuthorPage(slug);
Expand All @@ -29,7 +29,7 @@ export default function Index() {
<img
src={author.profile_image || "/images/ghost-logo.png"}
alt={author.name}
className="rounded-md sm:h-32 sm:w-32"
className="rounded-md sm:size-32"
/>
<div>
<h1 className="text-3xl font-semibold">{author.name}</h1>
Expand Down
4 changes: 2 additions & 2 deletions app/routes/_blog.authors.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { json, type LoaderArgs } from "@remix-run/node";
import { json, type LoaderFunctionArgs } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";

import { AuthorsSection } from "~/ui/components/authors/authors-section";

import { auth } from "~/services/auth.server";
import { getAllAuthors } from "~/services/ghost.server";

export async function loader({ request }: LoaderArgs) {
export async function loader({ request }: LoaderFunctionArgs) {
const user = await auth.isAuthenticated(request);
const { authors } = await getAllAuthors();
return json({
Expand Down
Loading

0 comments on commit 6f70a1b

Please sign in to comment.