Skip to content

Commit 616d137

Browse files
Merge branch 'main' into features-404
2 parents 271cae0 + 18433eb commit 616d137

File tree

4 files changed

+61
-15
lines changed

4 files changed

+61
-15
lines changed

.github/workflows/autoComment.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,29 @@ jobs:
4545
The team will review your PR shortly. If you have any questions, feel free to ask here!
4646
Happy Coding! 🚀
4747
48+
# Add labels to the pull request
49+
- name: Add Labels to Pull Request
50+
if: ${{ github.event_name == 'pull_request' }}
51+
uses: actions-ecosystem/action-add-labels@v1
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
labels: 'Under Review'
55+
number: ${{ github.event.pull_request.number }}
56+
57+
# Request a review for the pull request
58+
- name: Request Review on Pull Request
59+
if: ${{ github.event_name == 'pull_request' }}
60+
uses: actions/github-script@v6
61+
with:
62+
script: |
63+
github.rest.pulls.requestReviewers({
64+
owner: context.repo.owner,
65+
repo: context.repo.repo,
66+
pull_number: context.payload.pull_request.number,
67+
reviewers: ['yashksaini-coder']
68+
})
69+
70+
# Add a comment to the issue
4871
- name: Add Comment on Issue
4972
if: ${{ github.event_name == 'issues' }}
5073
uses: peter-evans/create-or-update-comment@v3

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ git push origin feature/your-feature-name
109109
# Go to the original repository on GitHub and open a new Pull Request
110110
# Provide a clear description of your changes in the Pull Request.
111111
```
112+
## Contributors
113+
We are grateful to our contributors!
114+
Below is a list of all the amazing contributors who have helped make this project better:
115+
116+
<p align="center"> <a href="https://github.com/yashksaini-coder/Leetcode-Journal/graphs/contributors"> <img src="https://contrib.rocks/image?repo=yashksaini-coder/Leetcode-Journal" /> </a> </p>
117+
118+
##
112119

113120
# Project Contributers:
114121
### Thank you everyone for your contributions! 🙏 We hope to see you contribute even more in the future. 🚀👨‍💻👩‍💻

components/navbar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Menu, X } from 'lucide-react'
1010
const navItems = [
1111
{ href: "/", label: "Home" },
1212
{ href: "#features", label: "Features" },
13-
{ href: "/how-it-works", label: "How it Works" },
13+
{ href: "/learn-more", label: "How it Works" },
1414
{ href: "/FAQ", label: "FAQs" },
1515
{ href: "/blog", label: "Blog" },
1616
]

components/theme-toggle.tsx

+30-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
"use client"
1+
"use client";
22

3-
import * as React from "react"
4-
import { Moon, Sun } from 'lucide-react'
5-
import { useTheme } from "next-themes"
3+
import * as React from "react";
4+
import { Moon, Sun } from "lucide-react";
5+
import { useTheme } from "next-themes";
66

7-
import { Button } from "@/components/ui/button"
7+
import { Button } from "@/components/ui/button";
88

99
export function ThemeToggle() {
10-
const { theme, setTheme } = useTheme()
10+
const { theme, setTheme, resolvedTheme } = useTheme();
11+
12+
React.useEffect(() => {
13+
if (!resolvedTheme) {
14+
setTheme("dark"); // DARK THEME BY DEFAULT
15+
}
16+
}, [resolvedTheme, setTheme]);
1117

1218
const toggleTheme = () => {
13-
setTheme(theme === "dark" ? "light" : "dark")
19+
setTheme(theme === "dark" ? "light" : "dark");
20+
};
21+
22+
// NOT RENDERING ICONS UNTIL THE THEME IS RESOLVED
23+
if (!resolvedTheme) {
24+
return null;
1425
}
1526

1627
return (
@@ -21,16 +32,21 @@ export function ThemeToggle() {
2132
aria-label="Toggle theme"
2233
className="relative p-2 rounded-full transition-colors duration-300 hover:bg-gray-200 dark:hover:bg-gray-700"
2334
>
24-
25-
<Sun className={`h-5 w-5 text-black-500 transition-all duration-500 ease-in-out transform ${
26-
theme === "dark" ? "rotate-180 opacity-0 scale-0" : "rotate-0 opacity-100 scale-100"
35+
<Sun
36+
className={`h-5 w-5 text-black-500 transition-all duration-500 ease-in-out transform ${
37+
resolvedTheme === "dark"
38+
? "rotate-180 opacity-0 scale-0"
39+
: "rotate-0 opacity-100 scale-100"
2740
}`}
2841
/>
29-
30-
<Moon className={`absolute h-5 w-5 text-white-700 transition-all duration-500 ease-in-out transform ${
31-
theme === "light" ? "rotate-0 opacity-0 scale-0" : "rotate-120 opacity-100 scale-100"
42+
43+
<Moon
44+
className={`absolute h-5 w-5 text-white-700 transition-all duration-500 ease-in-out transform ${
45+
resolvedTheme === "light"
46+
? "rotate-0 opacity-0 scale-0"
47+
: "rotate-120 opacity-100 scale-100"
3248
}`}
3349
/>
3450
</Button>
35-
)
51+
);
3652
}

0 commit comments

Comments
 (0)