Skip to content

Commit 3ad42c1

Browse files
committed
modified logo and icon
1 parent 30c613d commit 3ad42c1

4 files changed

Lines changed: 52 additions & 10 deletions

File tree

src/new-landingpage/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<link rel="icon" href="/new-assets/visualailogo.webp" />
6+
<link rel="icon" />
77
<script src="https://cdn.tailwindcss.com"></script>
88
<title>Langflow Landing Page</title>
99
</head>
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
// Shared constants for routing within the new landing page experience.
22
// Keep this in sync with the BrowserRouter basename so redirects land on the
33
// correct path regardless of which component triggers them.
4-
export const LANDING_BASENAME = "/new/landingpage";
4+
const BASE_URL = import.meta.env.BASE_URL ?? "/";
5+
6+
export const LANDING_BASENAME =
7+
BASE_URL.length > 1 && BASE_URL.endsWith("/")
8+
? BASE_URL.slice(0, -1)
9+
: BASE_URL;

src/new-landingpage/src/main.tsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22
import ReactDOM from "react-dom/client";
33
import { ClerkProvider } from "@clerk/clerk-react";
44
import { CookiesProvider } from "react-cookie";
5+
import faviconUrl from "./new-assets/visualailogo.webp?inline";
56
import App from "./App";
67
import "./index.css";
78

@@ -11,6 +12,37 @@ if (!clerkPublishableKey) {
1112
console.warn("VITE_CLERK_PUBLISHABLE_KEY is not set. Clerk login will not function correctly.");
1213
}
1314

15+
import React from "react";
16+
import ReactDOM from "react-dom/client";
17+
import { ClerkProvider } from "@clerk/clerk-react";
18+
import { CookiesProvider } from "react-cookie";
19+
import App from "./App";
20+
import faviconUrl from "./new-assets/visualailogo.webp?inline";
21+
import "./index.css";
22+
23+
const clerkPublishableKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY || "";
24+
25+
if (!clerkPublishableKey) {
26+
console.warn("VITE_CLERK_PUBLISHABLE_KEY is not set. Clerk login will not function correctly.");
27+
}
28+
29+
const setFavicon = (href: string) => {
30+
if (typeof document === "undefined") {
31+
return;
32+
}
33+
34+
let favicon = document.querySelector<HTMLLinkElement>('link[rel~="icon"]');
35+
if (!favicon) {
36+
favicon = document.createElement("link");
37+
favicon.rel = "icon";
38+
document.head.appendChild(favicon);
39+
}
40+
41+
favicon.href = href;
42+
};
43+
44+
setFavicon(faviconUrl);
45+
1446
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
1547
<React.StrictMode>
1648
<CookiesProvider>

src/new-landingpage/vite.config.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
import { defineConfig } from "vite";
1+
import { defineConfig, loadEnv } from "vite";
22
import react from "@vitejs/plugin-react-swc";
33

4-
export default defineConfig({
5-
plugins: [react()],
6-
base: "/new/landingpage/",
7-
build: {
8-
outDir: "dist",
9-
emptyOutDir: true
10-
}
4+
export default defineConfig(({ mode }) => {
5+
const env = loadEnv(mode, process.cwd(), "VITE_");
6+
const base = env.VITE_LANDING_BASE ?? "/new/landingpage/";
7+
8+
return {
9+
plugins: [react()],
10+
base,
11+
build: {
12+
outDir: "dist",
13+
emptyOutDir: true,
14+
},
15+
};
1116
});

0 commit comments

Comments
 (0)