Skip to content
Merged
4 changes: 2 additions & 2 deletions web/src/app/login-admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export default function AdminLoginPage() {
};

return (
<div style={styles.body}>
<div style={styles.container}>
<Section style={styles.body}>
<PageWrapper style={styles.container}>
<Image
src="https://raw.githubusercontent.com/SB2318/UltimateHealth/refs/heads/main/frontend/src/assets/images/adaptive-icon.png"
style={styles.icon}
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export default function UserLoginPage() {
};

return (
<div style={styles.body}>
<div style={styles.container}>
<Section style={styles.body}>
<PageWrapper style={styles.container}>
<Image
src="https://raw.githubusercontent.com/SB2318/UltimateHealth/refs/heads/main/frontend/src/assets/images/adaptive-icon.png"
style={styles.icon}
Expand Down
15 changes: 13 additions & 2 deletions web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ import "./globals.css";
import { type RefObject, useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react";
import HeroAndDownload from "../components/HeroAndDownload";
import ScrollToTop from "../components/ScrollToTop";

import { PageWrapper, Section } from "../components/layout";

import { withBasePath } from "@/lib/basePath";
import { Skeleton } from "../components/ui";
import PageWrapper from "../components/layout/PageWrapper";
import Section from "../components/layout/Section";


const userScreenshots = [
{ src: "/assets/article-home-screen.jpeg", caption: "Home Screen" },
Expand Down Expand Up @@ -507,8 +510,16 @@ export default function Home() {
</nav>
</header>

fix-unreachable-launching-soon-modal
{/* ── Hero ── */}
<HeroAndDownload
onJoinTestFlight={() => setAppleModal(true)}
onShowComingSoon={openComingSoonModal}
/>

{/* ── Hero + Downloads (new premium design) ── */}
<HeroAndDownload onJoinTestFlight={() => setAppleModal(true)} />
web
{/* ── Screenshots ── */}
<Section id="screenshots">
<PageWrapper>
Expand Down
21 changes: 17 additions & 4 deletions web/src/components/HeroAndDownload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Image from "next/image";

type HeroAndDownloadProps = {
onJoinTestFlight: () => void;
onShowComingSoon: () => void;
};

const activityItems = [
Expand Down Expand Up @@ -56,7 +57,7 @@ const platforms = [
},
];

export default function HeroAndDownload({ onJoinTestFlight }: HeroAndDownloadProps) {
export default function HeroAndDownload({ onJoinTestFlight, onShowComingSoon }: HeroAndDownloadProps) {
return (
<>
<section className="uh-hero">
Expand Down Expand Up @@ -244,7 +245,7 @@ export default function HeroAndDownload({ onJoinTestFlight }: HeroAndDownloadPro
</ul>

{platform.theme === "android" ? (
<AndroidStoreButtons />
<AndroidStoreButtons onShowComingSoon={onShowComingSoon} />
) : (
<IosStoreButtons onJoinTestFlight={onJoinTestFlight} />
)}
Expand Down Expand Up @@ -322,7 +323,7 @@ function MiniPhone({ theme }: { theme: string }) {
);
}

function AndroidStoreButtons() {
function AndroidStoreButtons({ onShowComingSoon }: Pick<HeroAndDownloadProps, "onShowComingSoon">) {
return (
<div className="uh-store-buttons-group">
<div className="uh-store-buttons">
Expand Down Expand Up @@ -352,12 +353,24 @@ function AndroidStoreButtons() {
<strong>UHealth Admin</strong>
</div>
</a>
<button
type="button"
onClick={onShowComingSoon}
className="uh-store-btn uh-store-admin"
aria-label="View UHealth Admin closed testing launch status"
>
<i className="fas fa-hourglass-half" aria-hidden="true" />
<div>
<small>Launch Status</small>
<strong>Closed Testing</strong>
</div>
</button>
</div>
</div>
);
}

function IosStoreButtons({ onJoinTestFlight }: HeroAndDownloadProps) {
function IosStoreButtons({ onJoinTestFlight }: Pick<HeroAndDownloadProps, "onJoinTestFlight">) {
return (
<div className="uh-store-buttons-group">
<div className="uh-store-buttons">
Expand Down
8 changes: 4 additions & 4 deletions web/src/lib/basePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH || "";
/**
* Create a URL with the basePath prepended
* Useful for internal navigation links
*
*
* @param path - The path relative to the app root (e.g., "/contribute")
* @returns The path with basePath prepended (e.g., "/frontend/v2/contribute")
*/
Expand All @@ -16,16 +16,16 @@ export function withBasePath(path: string): string {
if (path.startsWith("http://") || path.startsWith("https://") || path.startsWith("mailto:") || path.startsWith("tel:")) {
return path;
}

// Don't modify hash-only links
if (path.startsWith("#")) {
return path;
}

// Prepend basePath to internal paths
if (BASE_PATH && !path.startsWith(BASE_PATH)) {
return `${BASE_PATH}${path}`;
}

return path;
}
Loading