Skip to content
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

remove duplicated signin sections #171

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 12 additions & 21 deletions src/pages/EditorComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ function EditorComponent() {
const styles = {
flex: {
display: "flex",
flexDirection: "column",
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
},
languageDropdown: {
marginTop: "1rem",
Expand Down Expand Up @@ -373,16 +374,16 @@ function EditorComponent() {
fontSize: "1.5em",
}}
>
Custom Code Editor
Custom Code Editor
</span>
</div>
<div className="flex-container">
<div className="flex items-center space-x-2">
{currentUser ? (
<Stars />
<ToggleTheme />
{currentUser && (
<div className="flex-container">
<div className="flex items-center space-x-2">
<>
<WelcomeText>
Welcome, {currentUser.displayName}
</WelcomeText>
<WelcomeText>Welcome, {currentUser.displayName}</WelcomeText>
<Avatar
src={currentUser.photoURL}
alt={currentUser.displayName}
Expand All @@ -394,24 +395,14 @@ function EditorComponent() {
}}
/>
<div className="signout-container">
<button
onClick={handleSignOut}
className="signout-button"
>
<button onClick={handleSignOut} className="signout-button">
<span>Logout</span>
</button>
</div>
</>
) : (
<>
<GoogleSignIn />
<GithubSignIn />
</>
)}
</div>
</div>
<ToggleTheme />
<Stars />
</div>
)}
</div>
</Box>
{currentUser
Expand Down