diff --git a/web/app/ui/LoginButton.tsx b/web/app/ui/LoginButton.tsx
index e6e718e..abdf5d1 100644
--- a/web/app/ui/LoginButton.tsx
+++ b/web/app/ui/LoginButton.tsx
@@ -1,12 +1,15 @@
-import { auth } from '@/auth';
-import { authenticate, unauthenticate } from '../actions';
+'use client'
+
+import { auth } from '@/auth'
+import { authenticate, unauthenticate } from '../actions'
+import { useSession } from 'next-auth/react'
interface Props {
- className?: string;
+ className?: string
}
-export const Authentication = async ({ className }: Props) => {
- const session = await auth();
+export const Authentication = ({ className }: Props) => {
+ const { data: session } = useSession()
return (
@@ -22,5 +25,5 @@ export const Authentication = async ({ className }: Props) => {
)}
- );
-};
+ )
+}
diff --git a/web/lib/component/home/Home.test.tsx b/web/lib/component/home/Home.test.tsx
index a8788db..e472f2f 100644
--- a/web/lib/component/home/Home.test.tsx
+++ b/web/lib/component/home/Home.test.tsx
@@ -1,15 +1,20 @@
-import { render, screen } from '@testing-library/react';
-import Home from './Home';
+import { render, screen } from '@testing-library/react'
+import Home from './Home'
+import { SessionProvider } from 'next-auth/react'
-const DEFAULT_PROPS = {};
+const DEFAULT_PROPS = {}
const createComponent = () => {
- render();
-};
+ render(
+
+
+ ,
+ )
+}
describe('Home', () => {
it('should able to render component', () => {
- createComponent();
- expect(screen.getByText('Next+SST')).toBeTruthy();
- });
-});
+ createComponent()
+ expect(screen.getByText('SST Template')).toBeTruthy()
+ })
+})