Skip to content

Commit a5f26a3

Browse files
authored
Merge pull request #72 from CS3219-AY2425S1/wheatgrassmc/cs3-45-m517-leetcode-spa-page
Conditional rendering of sidebar
2 parents ab9924b + f36fcb5 commit a5f26a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

frontend/src/app/(auth)/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const Layout = ({ children }: { children: ReactNode }) => {
111111

112112
return (
113113
<div className="flex h-full overflow-y-auto">
114-
<Sidebar
114+
{token && <Sidebar
115115
className="sticky top-0 h-screen"
116116
rootStyles={{
117117
borderColor: "#171C28",
@@ -149,7 +149,7 @@ const Layout = ({ children }: { children: ReactNode }) => {
149149
</Menu>
150150
}
151151
</div>
152-
</Sidebar>
152+
</Sidebar>}
153153
<div className="w-full overflow-y-scroll">{children}</div>
154154
</div>
155155
);

frontend/src/app/(auth)/leetcode-dashboard/EditQuestionDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ const EditQuestionDialog = ({ questionId }: EditQuestionDialogProp) => {
9595
.then(() => {
9696
Swal.fire({
9797
icon: "success",
98-
title: "Question Added",
98+
title: "Question Edited",
9999
text: "Question has been modified successfully.",
100100
});
101101
})
102102
.catch(() => {
103103
Swal.fire({
104104
icon: "error",
105-
title: "Question Add Failed",
105+
title: "Question Edit Failed",
106106
text: "Please try again later.",
107107
});
108108
})

0 commit comments

Comments
 (0)