-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Routing & Css setting #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
057f019
6b1ff88
a49243d
c31a84d
80f842a
49e8add
20f654a
5e6e36f
4ccaeaa
6c20297
7778b37
6f24fe2
1078fa6
987ec18
4890337
b24718d
f7681ab
33eb0a5
8efc489
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: Close Jira issue | ||
| on: | ||
| issues: | ||
| types: | ||
| - closed | ||
|
|
||
| jobs: | ||
| close-issue: | ||
| name: Close Jira issue | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Login to Jira | ||
| uses: atlassian/gajira-login@v3 | ||
| env: | ||
| JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
| JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | ||
| JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
|
|
||
| - name: Extract Jira issue key from GitHub issue title | ||
| id: extract-key | ||
| run: | | ||
| ISSUE_TITLE="${{ github.event.issue.title }}" | ||
| CLEANED_TITLE=$(echo "$ISSUE_TITLE" | tr -d '[]') | ||
| echo "🧼 Cleaned title: $CLEANED_TITLE" | ||
|
|
||
| JIRA_KEY=$(echo "$CLEANED_TITLE" | grep -oE '[A-Z0-9]+-[0-9]+') | ||
|
|
||
| if [ -z "$JIRA_KEY" ]; then | ||
| echo "❌ JIRA key could not be extracted. Exiting." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "✅ Extracted JIRA_KEY=$JIRA_KEY" | ||
| echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV | ||
|
|
||
| - name: Transition Jira issue to Done | ||
| uses: atlassian/gajira-transition@v3 | ||
| with: | ||
| issue: ${{ env.JIRA_KEY }} | ||
| transition: 완료 | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,14 @@ | ||
| import { useState } from 'react'; | ||
| import reactLogo from './assets/react.svg'; | ||
| import viteLogo from '/vite.svg'; | ||
| import './App.css'; | ||
|
|
||
| function App() { | ||
| const [count, setCount] = useState(0); | ||
| import Router from './pages'; | ||
| import { Global } from '@emotion/react'; | ||
| import { globalStyles } from './styles/global/global'; | ||
|
|
||
| const App = () => { | ||
| return ( | ||
| <> | ||
| <div> | ||
| <a href="https://vite.dev" target="_blank"> | ||
| <img src={viteLogo} className="logo" alt="Vite logo" /> | ||
| </a> | ||
| <a href="https://react.dev" target="_blank"> | ||
| <img src={reactLogo} className="logo react" alt="React logo" /> | ||
| </a> | ||
| </div> | ||
| <h1>Vite + React</h1> | ||
| <div className="card"> | ||
| <button onClick={() => setCount(count => count + 1)}>count is {count}</button> | ||
| <p> | ||
| Edit <code>src/App.tsx</code> and save to test HMR | ||
| </p> | ||
| </div> | ||
| <p className="read-the-docs">Click on the Vite and React logos to learn more</p> | ||
| <Global styles={globalStyles} /> | ||
| <Router /> | ||
| </> | ||
| ); | ||
| } | ||
| }; | ||
|
|
||
| export default App; |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @import './reset.css'; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||||||||||||||||||||
| import { | ||||||||||||||||||||||
| createBrowserRouter, | ||||||||||||||||||||||
| createRoutesFromElements, | ||||||||||||||||||||||
| Route, | ||||||||||||||||||||||
| RouterProvider, | ||||||||||||||||||||||
| } from 'react-router-dom'; | ||||||||||||||||||||||
| import Signup from './signup/Signup'; | ||||||||||||||||||||||
| import SignupGenre from './signup/SignupGenre'; | ||||||||||||||||||||||
| import SignupNickname from './signup/SignupNickname'; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| const Router = () => { | ||||||||||||||||||||||
| const router = createBrowserRouter( | ||||||||||||||||||||||
| createRoutesFromElements( | ||||||||||||||||||||||
| <> | ||||||||||||||||||||||
| <Route path="signup" element={<Signup />}> | ||||||||||||||||||||||
| <Route index element={<SignupNickname />} /> | ||||||||||||||||||||||
| <Route path="genre" element={<SignupGenre />} /> | ||||||||||||||||||||||
| </Route> | ||||||||||||||||||||||
| </>, | ||||||||||||||||||||||
|
Comment on lines
+14
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 불필요한 Fragment 제거 정적 분석 도구가 지적한 대로, 단일 자식 요소만 포함하는 Fragment는 불필요합니다. 다음과 같이 수정하세요: - <>
- <Route path="signup" element={<Signup />}>
- <Route index element={<SignupNickname />} />
- <Route path="genre" element={<SignupGenre />} />
- </Route>
- </>,
+ <Route path="signup" element={<Signup />}>
+ <Route index element={<SignupNickname />} />
+ <Route path="genre" element={<SignupGenre />} />
+ </Route>,📝 Committable suggestion
Suggested change
🧰 Tools🪛 Biome (1.9.4)[error] 14-19: Avoid using unnecessary Fragment. A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment. (lint/complexity/noUselessFragments) 🤖 Prompt for AI Agents |
||||||||||||||||||||||
| ), | ||||||||||||||||||||||
| ); | ||||||||||||||||||||||
| return <RouterProvider router={router} />; | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export default Router; | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| import styled from '@emotion/styled'; | ||
|
|
||
| const HeaderWrapper = styled.div` | ||
| background-color: #121212; | ||
| position: fixed; | ||
| top: 0; | ||
| left: 0; | ||
| right: 0; | ||
| z-index: 100; | ||
| max-width: 768px; | ||
| margin: 0 auto; | ||
| padding: 16px 20px; | ||
|
|
||
| .title { | ||
| color: #fefefe; | ||
| font-size: 22px; | ||
| font-style: normal; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .next { | ||
| width: 49px; | ||
| height: 28px; | ||
| padding: 4px 12px; | ||
| align-items: center; | ||
| border-radius: 20px; | ||
| background: #888; | ||
|
|
||
| color: #fefefe; | ||
| text-align: center; | ||
| font-size: 14px; | ||
| font-style: normal; | ||
| font-weight: 600; | ||
| line-height: 20px; | ||
| } | ||
| `; | ||
|
|
||
| const InnerHeader = styled.div` | ||
| width: 100%; | ||
| height: 56px; | ||
| display: flex; | ||
| flex-direction: row; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| `; | ||
|
|
||
| type HeaderProps = { | ||
| title: string; | ||
| leftIcon?: React.ReactNode; | ||
| rightButton?: React.ReactNode; | ||
| onLeftClick?: (e: React.MouseEvent<HTMLDivElement>) => void; | ||
| onRightClick?: (e: React.MouseEvent<HTMLDivElement>) => void; | ||
| }; | ||
|
|
||
| const Header = ({ leftIcon, title, rightButton, onLeftClick, onRightClick }: HeaderProps) => ( | ||
| <HeaderWrapper> | ||
| <InnerHeader> | ||
| <div onClick={onLeftClick} style={{ cursor: onLeftClick ? 'pointer' : 'default' }}> | ||
| {leftIcon} | ||
| </div> | ||
| <div className="title">{title}</div> | ||
| <div onClick={onRightClick} style={{ cursor: onRightClick ? 'pointer' : 'default' }}> | ||
| {rightButton} | ||
| </div> | ||
| </InnerHeader> | ||
| </HeaderWrapper> | ||
| ); | ||
|
|
||
| export default Header; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
보안: 인라인 스크립트에서 GitHub 이벤트 변수 직접 사용 금지
현재 스크립트에서
${{ github.event.issue.title }}를 직접 삽입해 입력값을 처리하고 있어 코드 인젝션 위험이 있습니다.환경 변수로 전달하도록 아래 예시와 같이 리팩토링을 권장합니다:
📝 Committable suggestion
🤖 Prompt for AI Agents