-
Notifications
You must be signed in to change notification settings - Fork 0
feat/#64 Workspace 가입 버튼 #65
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
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,39 @@ | ||
| import React from "react"; | ||
| import slackLogo from "@/assets/images/sub_logo.png"; | ||
|
|
||
| interface Props { | ||
| onClick: () => void; | ||
| } | ||
|
|
||
| const WorkSpaceButton: React.FC<Props> = ({ onClick }) => { | ||
| return ( | ||
| <button | ||
| onClick={onClick} | ||
| aria-label="워크스페이스 가입하기" | ||
| className=" | ||
| flex items-center justify-center gap-3 | ||
| w-[400px] md:w-[480px] max-w-[85%] h-[60px] | ||
| bg-white border border-gray-300 rounded-xl | ||
|
|
||
| shadow-sm | ||
| hover:shadow-md hover:bg-gray-50 | ||
| active:shadow-sm active:scale-[0.97] | ||
|
|
||
| transition-all duration-200 ease-out | ||
| select-none | ||
| " | ||
|
Comment on lines
+13
to
+24
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. 여러 줄의 |
||
| > | ||
| <img | ||
| src={slackLogo} | ||
| alt="Slack Logo" | ||
| className="h-[14px] w-auto md:h-[16px]" | ||
| /> | ||
|
|
||
| <span className="text-gray-800 text-lg md:text-xl font-medium tracking-tight"> | ||
| Workspace 가입하기 | ||
| </span> | ||
| </button> | ||
| ); | ||
| }; | ||
|
|
||
| export default WorkSpaceButton; | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,30 +1,39 @@ | ||||||||||||||||||||||||||||||
| import SlackLoginButton from "@/components/signup/SlackLoginButton"; | ||||||||||||||||||||||||||||||
| import WorkSpaceButton from "@/components/signup/WorkSpaceButton"; | ||||||||||||||||||||||||||||||
| import mainLogo from "@/assets/images/main_logo.png"; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| export const SLACK_CLIENT_ID = import.meta.env.VITE_SLACK_CLIENT_ID; | ||||||||||||||||||||||||||||||
| export const SLACK_REDIRECT_URI = import.meta.env.VITE_SLACK_REDIRECT_URI; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| const INVITE_URL = | ||||||||||||||||||||||||||||||
| "https://join.slack.com/t/slackjudge/shared_invite/zt-3jvozgq6d-~pNce8kQdm6SFy4InCmryA"; | ||||||||||||||||||||||||||||||
|
Comment on lines
+8
to
+9
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.
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| export default function LoginPage() { | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| const handleSlackLogin = () => { | ||||||||||||||||||||||||||||||
| window.location.href = `https://slack.com/openid/connect/authorize?scope=email openid profile&client_id=${SLACK_CLIENT_ID}&redirect_uri=${SLACK_REDIRECT_URI}&response_type=code` | ||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| const handleWorkSpace = () => { | ||||||||||||||||||||||||||||||
| window.open(INVITE_URL, "_blank", "noopener,noreferrer"); | ||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||
|
Comment on lines
13
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.
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||
| <div className=" | ||||||||||||||||||||||||||||||
| min-h-screen flex flex-col items-center justify-center | ||||||||||||||||||||||||||||||
| bg-white px-4 | ||||||||||||||||||||||||||||||
| "> | ||||||||||||||||||||||||||||||
| <div className="min-h-screen flex flex-col items-center justify-center bg-white px-4"> | ||||||||||||||||||||||||||||||
| <img | ||||||||||||||||||||||||||||||
| src={mainLogo} | ||||||||||||||||||||||||||||||
| alt="Slack Judge" | ||||||||||||||||||||||||||||||
| className=" | ||||||||||||||||||||||||||||||
| w-[240px] md:w-[280px] lg:w-[300px] | ||||||||||||||||||||||||||||||
| mb-14 md:mb-16 | ||||||||||||||||||||||||||||||
| " | ||||||||||||||||||||||||||||||
| className="w-[240px] md:w-[280px] lg:w-[300px] mb-14 md:mb-16" | ||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| <SlackLoginButton onClick={handleSlackLogin} /> | ||||||||||||||||||||||||||||||
| <div className="w-full flex flex-col items-center gap-4"> | ||||||||||||||||||||||||||||||
| <WorkSpaceButton onClick={handleWorkSpace} /> | ||||||||||||||||||||||||||||||
| <SlackLoginButton onClick={handleSlackLogin} /> | ||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| <div className="w-[400px] md:w-[480px] max-w-[85%] text-center text-sm text-gray-400 leading-relaxed"> | ||||||||||||||||||||||||||||||
| 워크스페이스에 가입한 후, 로그인을 진행해주세요. | ||||||||||||||||||||||||||||||
|
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. |
||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
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.
button요소에type속성을 명시하는 것이 좋습니다.type의 기본값은 "submit"이므로, 이 버튼이<form>내부에 위치하게 될 경우 의도치 않게 form을 제출할 수 있습니다.type="button"을 추가하여 이러한 예기치 않은 동작을 방지해주세요.