From 937eae37926592b9e498579ced72fc13f01dcb31 Mon Sep 17 00:00:00 2001 From: zahyaah Date: Fri, 23 Aug 2024 02:27:32 +0530 Subject: [PATCH 1/6] fix typo and grammar in features.tsx --- src/components/features.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/features.tsx b/src/components/features.tsx index b5df379..214e3ab 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -73,7 +73,7 @@ export default function Features() { Goodbye bad performance

- We are constantly tweak firefox's engine and settings to make it + We are constantly tweaking Firefox's engine and settings to make it faster than ever. Learn more

@@ -101,7 +101,7 @@ export default function Features() { Secure by default

- We are always using the latest security features from firefox to + We are always using the latest security features from Firefox to keep you safe. Learn more

From 1c0ad13629b762f7269830e13de0872022be2995 Mon Sep 17 00:00:00 2001 From: Shawn Santhoshgeorge <32755895+ShawnGeorge03@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:03:12 -0400 Subject: [PATCH 2/6] fix: Fixed download links for Branding Assets --- src/components/branding-assets.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/branding-assets.tsx b/src/components/branding-assets.tsx index fb14914..5100b07 100644 --- a/src/components/branding-assets.tsx +++ b/src/components/branding-assets.tsx @@ -1,3 +1,4 @@ + import { LOGO_COLORS } from "@/lib/logos"; export function BrandingAssets() { @@ -19,6 +20,7 @@ export function BrandingAssets() {
{color} @@ -40,7 +42,7 @@ export function BrandingAssets() {
{color} From de147a219f9358c5d81006bb34f59b090f36cc32 Mon Sep 17 00:00:00 2001 From: busybox11 Date: Sat, 24 Aug 2024 01:43:09 +0200 Subject: [PATCH 3/6] fix: Use NextJS recommended config for styled-components --- next.config.mjs | 10 +++++---- src/app/layout.tsx | 5 +++-- src/lib/styled-components-registry.tsx | 29 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 src/lib/styled-components-registry.tsx diff --git a/next.config.mjs b/next.config.mjs index 48f03d4..431d026 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -3,17 +3,19 @@ const nextConfig = { images: { remotePatterns: [ { - protocol: 'https', - hostname: 'raw.githubusercontent.com', + protocol: "https", + hostname: "raw.githubusercontent.com", }, ], }, experimental: { serverActions: { // edit: updated to new key. Was previously `allowedForwardedHosts` - allowedOrigins: ['localhost:3000', 'get-zen.vercel.app'], + allowedOrigins: ["localhost:3000", "get-zen.vercel.app"], }, - + }, + compiler: { + styledComponents: true, }, }; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 3de6cf4..971e56e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,8 @@ import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "./globals.css"; -import { ThemeProvider } from "@/components/theme-provider" +import { ThemeProvider } from "@/components/theme-provider"; +import StyledComponentsRegistry from "@/lib/styled-components-registry"; const inter = Inter({ subsets: ["latin"] }); @@ -25,7 +26,7 @@ export default function RootLayout({ enableSystem disableTransitionOnChange > - {children} + {children} diff --git a/src/lib/styled-components-registry.tsx b/src/lib/styled-components-registry.tsx new file mode 100644 index 0000000..fa12293 --- /dev/null +++ b/src/lib/styled-components-registry.tsx @@ -0,0 +1,29 @@ +"use client"; + +import React, { useState } from "react"; +import { useServerInsertedHTML } from "next/navigation"; +import { ServerStyleSheet, StyleSheetManager } from "styled-components"; + +export default function StyledComponentsRegistry({ + children, +}: { + children: React.ReactNode; +}) { + // Only create stylesheet once with lazy initial state + // x-ref: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state + const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet()); + + useServerInsertedHTML(() => { + const styles = styledComponentsStyleSheet.getStyleElement(); + styledComponentsStyleSheet.instance.clearTag(); + return <>{styles}; + }); + + if (typeof window !== "undefined") return <>{children}; + + return ( + + {children} + + ); +} From 465b1ab524b7f2339d4d9399c01155211d01be48 Mon Sep 17 00:00:00 2001 From: camilo Date: Fri, 23 Aug 2024 21:21:14 -0500 Subject: [PATCH 4/6] fix(theme-page): resolve sidebar overlapping footer issue - Fixed the issue where the sidebar was overlapping the footer by changing `lg:fixed` to `lg:sticky` and adjusting padding/margin. - Removed unused imports (`LoaderIcon`, `LoaderPinwheelIcon`, `MoveLeftIcon`) from `lucide-react`. - Moved "Go back" button to the top of the sidebar for better UX. --- src/components/theme-page.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/theme-page.tsx b/src/components/theme-page.tsx index b8be7fd..6a89b9d 100644 --- a/src/components/theme-page.tsx +++ b/src/components/theme-page.tsx @@ -4,7 +4,7 @@ import { Button } from "./ui/button"; import { useEffect, useState } from "react"; import Markdown from "react-markdown"; import '../app/privacy-policy/markdown.css'; -import { ChevronLeft, LoaderCircleIcon, LoaderIcon, LoaderPinwheelIcon, MoveLeftIcon } from "lucide-react"; +import { ChevronLeft, LoaderCircleIcon } from "lucide-react"; export default function ThemePage({ theme }: { theme: ZenTheme }) { const [readme, setReadme] = useState(null); @@ -14,7 +14,11 @@ export default function ThemePage({ theme }: { theme: ZenTheme }) { return (
-
+
-
-
window.history.back()}> - -

Go back

-
+
{readme === null ? ( - + ) : ( {`${readme}`} )} From 0861a2f44d8afcc8f30c0aec93734dd0ae25c0f2 Mon Sep 17 00:00:00 2001 From: ayn2op Date: Sat, 24 Aug 2024 14:46:58 +0530 Subject: [PATCH 5/6] fix: capitalize "firefox" --- src/app/privacy-policy/page.tsx | 2 +- src/components/features.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/privacy-policy/page.tsx b/src/app/privacy-policy/page.tsx index 7a9af0a..5408dea 100644 --- a/src/app/privacy-policy/page.tsx +++ b/src/app/privacy-policy/page.tsx @@ -52,7 +52,7 @@ Zen Browser offers a "Sync" feature, this is implemented using Mozilla Firefox's # 4. Data Security Although Zen Browser does not collect your data, we are committed to protecting the information that is stored locally on your device and, if you use the Sync feature, the encrypted data stored on Mozilla's servers. We recommend that you use secure passwords, enable device encryption, and regularly update your software to ensure your data remains safe. -* Note that most of the security measures are taken care by mozilla firefox. +* Note that most of the security measures are taken care by Mozilla Firefox. # 5. Your Control ## 5.1. Data Deletion diff --git a/src/components/features.tsx b/src/components/features.tsx index 384f621..2b10417 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -74,7 +74,7 @@ export default function Features() { Goodbye bad performance

- We are constantly tweak firefox's engine and settings to make it + We are constantly tweak Firefox's engine and settings to make it faster than ever. Learn more

@@ -102,7 +102,7 @@ export default function Features() { Secure by default

- We are always using the latest security features from firefox to + We are always using the latest security features from Firefox to keep you safe. Learn more

From 9c49f996c3d289e848ce684b504bed29ca5557cb Mon Sep 17 00:00:00 2001 From: thebluedev Date: Sat, 24 Aug 2024 15:16:13 +0530 Subject: [PATCH 6/6] fix: Fix grammar in features --- src/components/features.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/features.tsx b/src/components/features.tsx index 014fdce..eecd57c 100644 --- a/src/components/features.tsx +++ b/src/components/features.tsx @@ -73,7 +73,7 @@ export default function Features() { Goodbye bad performance

- We are constantly tweak firefox's engine and settings to make it + We constantly tweak firefox's engine and settings to make it faster than ever. Learn more