Skip to content

Commit

Permalink
Move things
Browse files Browse the repository at this point in the history
  • Loading branch information
rkyslyy committed Jul 2, 2024
1 parent 04da47a commit 124deb4
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 42 deletions.
4 changes: 2 additions & 2 deletions web/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import SessionWrapper from './providers/SessionProvider'
import SessionWrapper from './lib/providers/SessionProvider'
import { ApolloClientProvider } from './apolloClient'
import clsx from 'clsx'
import { Authentication } from './ui/Authentication/Authentication'
import { Authentication } from './lib/ui/Authentication/Authentication'

const inter = Inter({ subsets: ['latin'] })

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { render, screen } from '@testing-library/react'
import Home from './Home'
import { SessionProvider } from 'next-auth/react'

const DEFAULT_PROPS = {}
import { Hero } from './Hero'

const createComponent = () => {
render(
<SessionProvider>
<Home {...DEFAULT_PROPS} />
<Hero />
</SessionProvider>,
)
}

describe('Home', () => {
describe('Hero', () => {
it('should able to render component', () => {
createComponent()
expect(screen.getByText('SST Template')).toBeTruthy()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
'use client';
'use client'

import React, { useEffect, useRef, useState } from 'react';
import React, { useEffect, useRef, useState } from 'react'
import STACK from './Stack'

import STACK from './Stack';
const getRandomNumber = (min: number, max: number) => Math.random() * (max - min) + min

const getRandomNumber = (min: number, max: number) => Math.random() * (max - min) + min;

export const Splash = () => {
const [drops, setDrops] = useState<JSX.Element[]>([]);
const rootRef = useRef<HTMLDivElement>(null);
const techIndex = useRef(0);
export const Hero = () => {
const [drops, setDrops] = useState<JSX.Element[]>([])
const rootRef = useRef<HTMLDivElement>(null)
const techIndex = useRef(0)

useEffect(() => {
const interval = setInterval(
Expand All @@ -23,14 +22,14 @@ export const Splash = () => {
onAnimationEnd={() => setDrops((c) => c.slice(1))}
>
{STACK[techIndex.current++ % STACK.length]}
</div>
)
</div>,
),
),
1000
);
1000,
)

return () => clearInterval(interval);
}, []);
return () => clearInterval(interval)
}, [])

return (
<div className="flex items-center flex-col relative" ref={rootRef}>
Expand All @@ -42,5 +41,5 @@ export const Splash = () => {
SST Template
</h1>
</div>
);
};
)
}
File renamed without changes.
4 changes: 2 additions & 2 deletions web/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Home from '@/lib/component/home/Home'
import { Hero } from './lib/ui/Hero/Hero'

export default function Page() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<Home />
<Hero />
</main>
)
}
4 changes: 2 additions & 2 deletions web/app/sample/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { TestGql } from './TestGql'

export default () => {
return (
<div>
<main>
<TestGql />
</div>
</main>
)
}
2 changes: 1 addition & 1 deletion web/app/serverActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export async function authenticate(redirectTo?: string) {
}

export async function unauthenticate() {
await signOut()
await signOut({ redirectTo: '/' })
}
13 changes: 0 additions & 13 deletions web/lib/component/home/Home.tsx

This file was deleted.

0 comments on commit 124deb4

Please sign in to comment.