Skip to content

Commit

Permalink
fix(v-next): auth trust host
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronConlon committed Jul 20, 2024
1 parent 82b2795 commit 8260890
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion apps/v-next/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const authInstance = NextAuth({
return session;
}
},
trustHost: true
trustHost: true,
secret: process.env.AUTH_SECRET
});

export const { handlers, signIn, signOut, auth } = authInstance;
10 changes: 3 additions & 7 deletions apps/v-next/components/SocialMediaShare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import {
} from 'next-share';

import { WeiboIcon, WeiboShareButton } from 'next-share';
import { useState } from 'react';

export default function SocialMediaShare() {
const title = `${PROJECT.name} - ${PROJECT.description}`;
const url = `https://${location.hostname}`;
const [url] = useState(`https://${globalThis?.location?.hostname}`);

return (
<div className="p-4 mt-12">
Expand All @@ -44,12 +45,7 @@ export default function SocialMediaShare() {
<PinterestIcon size={32} round />
</PinterestShareButton>

<WeiboShareButton
url={url}
blankTarget
title={title}
image={`${String(globalThis.location)}/shandian.svg`}
>
<WeiboShareButton url={url} blankTarget title={title} image={`${url}/shandian.svg`}>
<WeiboIcon size={32} round />
</WeiboShareButton>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/v-next/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Home() {
<div className="bg-gray-50 group">
<div className="md:w-[1200px] max-w-[100vw] p-16 md:p-4 grid grid-cols-1 sm:grid-cols-[auto_420px] mx-auto items-center">
<div className="">
<h1 className="text-2xl md:text-4xl xl:text-5xl font-bold animate-flip-up fancy-text">
<h1 className="text-2xl md:text-4xl xl:text-5xl font-bold animate-flip-up animate-delay-500 fancy-text">
Delete & Archive Github Repo
</h1>
<p className="text-xl pt-4 text-gray-500 my-12 md:my-0">
Expand Down

0 comments on commit 8260890

Please sign in to comment.