Skip to content

Commit

Permalink
chore: 세팅 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
jgjgill committed Dec 18, 2023
1 parent 180309b commit 57570d4
Show file tree
Hide file tree
Showing 14 changed files with 10,876 additions and 2,157 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:storybook/recommended",
"plugin:tailwindcss/recommended",
"plugin:react/recommended",
"prettier",
"plugin:@tanstack/eslint-plugin-query/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react", "@tanstack/query"],
"rules": { "react/react-in-jsx-scope": "off" }
}
26 changes: 26 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/♻️-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: '♻️ Refactor'
about: refactor 작업 사항을 작성해주세요!
title: ''
labels: [☁️ FE, ♻️ refactor]
assignees: ''
---

# ♻️ Refactor

## Description

현재 어떤 기능을 리팩토링 중인지 간단하게 한 줄로 작성해주세요.

## To-do

- [ ] 상세 내용 1
- [ ] 상세 내용 2

## 기타

따로 팀원과 상의가 필요한 부분들을 적는 공간입니다.

<!-- 이슈와 연관된 Discussion이 있다면 번호를 기입해주세요. ex) #11 -->

<https://github.com/orgs/team-moabam/discussions/번호>
26 changes: 26 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/✨-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: '✨ Feature'
about: feature 작업 사항을 작성해주세요!
title: ''
labels: [☁️ FE, ✨ feature]
assignees: ''
---

# ✨ Feature

## Description

현재 어떤 기능 구현을 진행중인지 간단하게 한줄로 작성해주세요.

## To-do

- [ ] 상세 내용 1
- [ ] 상세 내용 2

## 기타

따로 팀원과 상의가 필요한 부분들을 적는 공간입니다.

<!-- 이슈와 연관된 Discussion이 있다면 번호를 기입해주세요. ex) #11 -->

https://github.com/orgs/team-moabam/discussions/번호
26 changes: 26 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/🚨-hotfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: "\U0001F6A8 Hotfix"
about: hotfix 작업 사항을 작성해주세요!
title: ''
labels: [☁️ FE, \U0001F41B fix]
assignees: ''
---

# 🚨 Hotfix

## Description

현재 어떤 버그가 있는지 작성해주세요. 이미지를 첨부하셔도 좋습니다.

## To-do

- [ ] 상세 내용 1
- [ ] 상세 내용 2

## 기타

따로 팀원과 상의가 필요한 부분들을 적는 공간입니다.

<!-- 이슈와 연관된 Discussion이 있다면 번호를 기입해주세요. ex) #11 -->

https://github.com/orgs/team-moabam/discussions/번호
9 changes: 9 additions & 0 deletions .github/workflows/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- PR 제목은 커밋 메세지 컨벤션 형식으로 작성해주세요 ex) feat: 메인페이지 UI 구현, fix: 로딩관련 예외처리 구현 -->

## 🧩 이슈 번호 <!-- 이슈 번호를 작성해주세요 ex) #11 -->

- close #이슈번호

## ✅ 작업 사항

## 👩‍💻 공유 포인트 및 논의 사항
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint-staged
13 changes: 13 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSameLine": false,
"bracketSpacing": true,
"arrowParens": "always",
"quoteProps": "as-needed",
"semi": true,
"trailingComma": "es5",
"jsxSingleQuote": false
}
27 changes: 15 additions & 12 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
import { GeistSans } from 'geist/font/sans'
import './globals.css'
import { GeistSans } from 'geist/font/sans';
import './globals.css';
import QueryProvider from '@/providers/QueryProvider';

const defaultUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: 'http://localhost:3000'
: 'http://localhost:3000';

export const metadata = {
metadataBase: new URL(defaultUrl),
title: 'Next.js and Supabase Starter Kit',
description: 'The fastest way to build apps with Next.js and Supabase',
}
};

export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en" className={GeistSans.className}>
<body className="bg-background text-foreground">
<main className="min-h-screen flex flex-col items-center">
{children}
</main>
</body>
<html lang="ko" className={GeistSans.className}>
<QueryProvider>
<body className="bg-background text-foreground">
<main className="flex min-h-screen flex-col items-center">
{children}
</main>
</body>
</QueryProvider>
</html>
)
);
}
50 changes: 29 additions & 21 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,53 @@
import DeployButton from '../components/DeployButton'
import AuthButton from '../components/AuthButton'
import { createClient } from '@/utils/supabase/server'
import ConnectSupabaseSteps from '@/components/ConnectSupabaseSteps'
import SignUpUserSteps from '@/components/SignUpUserSteps'
import Header from '@/components/Header'
import { cookies } from 'next/headers'
import DeployButton from '../components/DeployButton';
import AuthButton from '../components/AuthButton';
import { createClient } from '@/utils/supabase/server';
import ConnectSupabaseSteps from '@/components/ConnectSupabaseSteps';
import SignUpUserSteps from '@/components/SignUpUserSteps';
import Header from '@/components/Header';
import { cookies } from 'next/headers';

export default async function Index() {
const cookieStore = cookies()
const cookieStore = cookies();

const canInitSupabaseClient = () => {
// This function is just for the interactive tutorial.
// Feel free to remove it once you have Supabase connected.
try {
createClient(cookieStore)
return true
createClient(cookieStore);
return true;
} catch (e) {
return false
return false;
}
}
};

const isSupabaseConnected = canInitSupabaseClient()
const isSupabaseConnected = canInitSupabaseClient();

return (
<div className="flex-1 w-full flex flex-col gap-20 items-center">
<nav className="w-full flex justify-center border-b border-b-foreground/10 h-16">
<div className="w-full max-w-4xl flex justify-between items-center p-3 text-sm">
<div className="flex w-full flex-1 flex-col items-center gap-20">
<nav className="flex h-16 w-full justify-center border-b border-b-foreground/10">
<div className="flex w-full max-w-4xl items-center justify-between p-3 text-sm">
<DeployButton />
{isSupabaseConnected && <AuthButton />}
</div>
</nav>

<div className="animate-in flex-1 flex flex-col gap-20 opacity-0 max-w-4xl px-3">
<div>
{[1, 2, 3, 45].map((item) => (
<div key={item}>12312312312</div>
))}
</div>

<div className="animate-in flex max-w-4xl flex-1 flex-col gap-20 px-3 opacity-0">
<Header />
<main className="flex-1 flex flex-col gap-6">
<h2 className="font-bold text-4xl mb-4">Next steps</h2>
<main className="flex flex-1 flex-col gap-6">
<h2 className="mb-4 flex justify-end bg-teal-300 text-4xl font-bold">
Next steps
</h2>
{isSupabaseConnected ? <SignUpUserSteps /> : <ConnectSupabaseSteps />}
</main>
</div>

<footer className="w-full border-t border-t-foreground/10 p-8 flex justify-center text-center text-xs">
<footer className="flex w-full justify-center border-t border-t-foreground/10 p-8 text-center text-xs">
<p>
Powered by{' '}
<a
Expand All @@ -53,5 +61,5 @@ export default async function Index() {
</p>
</footer>
</div>
)
);
}
Loading

0 comments on commit 57570d4

Please sign in to comment.