Skip to content

Commit c6d375b

Browse files
feat: implement Home component with weather widget conditional rendering
1 parent f12b667 commit c6d375b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/app/page.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
import { weatherWidgetFlag } from "./flags";
2+
import WeatherClient from "./components/WeatherClient";
23

3-
export default async function Page() {
4-
const weather = await weatherWidgetFlag();
4+
export default async function Home() {
5+
const isWeatherWidgetEnabled = await weatherWidgetFlag();
56

6-
return <div>{weather ? "Flag is on" : "Flag is off"}</div>;
7+
return (
8+
<div className="container">
9+
<h1>Welcome to Next.js + Playwright</h1>
10+
{isWeatherWidgetEnabled ? (
11+
<WeatherClient isEnabled={isWeatherWidgetEnabled} />
12+
) : (
13+
<p>🚫 Feature X is OFF</p>
14+
)}
15+
</div>
16+
);
717
}

0 commit comments

Comments
 (0)