-
Notifications
You must be signed in to change notification settings - Fork 35
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
[최영선] Sprint8 #242
The head ref may contain hidden characters: "React-\uCD5C\uC601\uC120-sprint8"
[최영선] Sprint8 #242
Changes from all commits
27c34c6
baacc0e
3cd6880
a8f1f9b
cd36637
7af9406
c59619f
692d0a4
8695600
a349363
0bd661a
4cf9658
354ca7b
f6a8617
e649583
53ea1ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import styled from "styled-components"; | ||
|
||
const StyledCommonButton = styled.button` | ||
height: 42px; | ||
padding: 12px 20px; | ||
border-radius: 8px; | ||
margin: auto 0; | ||
border: none; | ||
color: var(--gray-50); | ||
background-color: var(--blue-100); | ||
cursor: pointer; | ||
text-align: center; | ||
align-items: center; | ||
font-size: 18px; | ||
font-weight: 600; | ||
`; | ||
|
||
export default StyledCommonButton; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
html, | ||
body { | ||
width: 100%; | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
:root { | ||
/* Gray scale */ | ||
--gray-900: #111827; | ||
--gray-800: #1f2937; | ||
--gray-700: #374151; | ||
--gray-600: #4b5563; | ||
--gray-500: #6b7280; | ||
--gray-400: #9ca3af; | ||
--gray-200: #e5e7eb; | ||
--gray-100: #f3f4f6; | ||
--gray-50: #f9fafb; | ||
|
||
/* Primary color */ | ||
--blue-100: #3692ff; | ||
--blue-200: #1967d6; | ||
--blue-300: #1251aa; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { useState, useCallback, useEffect } from "react"; | ||
|
||
const useFetch = (fetchCallback, dependencies = []) => { | ||
const [data, setData] = useState(null); | ||
const [error, setError] = useState(null); | ||
const [loading, setLoading] = useState(true); | ||
|
||
const fetchData = useCallback(async () => { | ||
setLoading(true); | ||
try { | ||
const result = await fetchCallback(); | ||
setData(result); | ||
setError(null); | ||
} catch (error) { | ||
setError(error.message); | ||
} finally { | ||
setLoading(false); | ||
} | ||
}, dependencies); | ||
|
||
useEffect(() => { | ||
fetchData(); | ||
}, [fetchData]); | ||
|
||
return { data, error, loading }; | ||
}; | ||
|
||
export default useFetch; | ||
Comment on lines
+1
to
+28
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.
|
This file was deleted.
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.
확실히 이전보다
styled-components
숙련도가 올라왔네요! 👍