Refactor: 홈 클릭 시 로그인 되게 변경(임시)
This commit is contained in:
parent
688a7a4a13
commit
b23e08c365
@ -10,6 +10,7 @@ interface HomeProps {
|
|||||||
export default function Home({ isLoggedIn = false, setIsLoggedIn }: HomeProps) {
|
export default function Home({ isLoggedIn = false, setIsLoggedIn }: HomeProps) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const [selectedWorkspace, setSelectedWorkspace] = useState('');
|
const [selectedWorkspace, setSelectedWorkspace] = useState('');
|
||||||
|
const [loggedIn, setLoggedIn] = useState(isLoggedIn);
|
||||||
|
|
||||||
const workspaces = [
|
const workspaces = [
|
||||||
{ id: 1, name: 'Workspace 1' },
|
{ id: 1, name: 'Workspace 1' },
|
||||||
@ -19,6 +20,7 @@ export default function Home({ isLoggedIn = false, setIsLoggedIn }: HomeProps) {
|
|||||||
|
|
||||||
const handleGoogleSignIn = () => {
|
const handleGoogleSignIn = () => {
|
||||||
console.log('구글로 계속하기');
|
console.log('구글로 계속하기');
|
||||||
|
setLoggedIn(true); // 임시 코드
|
||||||
if (setIsLoggedIn) {
|
if (setIsLoggedIn) {
|
||||||
setIsLoggedIn(true);
|
setIsLoggedIn(true);
|
||||||
}
|
}
|
||||||
@ -45,7 +47,7 @@ export default function Home({ isLoggedIn = false, setIsLoggedIn }: HomeProps) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!isLoggedIn ? (
|
{!loggedIn ? (
|
||||||
<button
|
<button
|
||||||
onClick={handleGoogleSignIn}
|
onClick={handleGoogleSignIn}
|
||||||
className="mb-4 transition hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-gray-300 active:opacity-80"
|
className="mb-4 transition hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-gray-300 active:opacity-80"
|
||||||
|
Loading…
Reference in New Issue
Block a user