Skip to content

Commit

Permalink
fix: update index page
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 7, 2023
1 parent a3b860f commit 2b6e8cc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { AnalyticsBrowser } from "@segment/analytics-next";
import { Analytics as AnalyticsType } from "@segment/analytics-next/dist/types/core/analytics";
import { NextPage } from "next";
import React, { useEffect, useState } from "react";
import { useAnalytics } from "~/components/context/analytics";
import SlugPage from "./[...slug]";

function Home(): React.ReactElement {
const Home: NextPage<{
showSingIn: (show: boolean) => void;
}> = ({ showSingIn }) => {
const [analytics, setAnalytics] = useState<AnalyticsType | undefined>(
undefined
);
Expand All @@ -25,6 +28,6 @@ function Home(): React.ReactElement {
}
handleAnalyticsLoading(analyticsBrowser).catch(console.error);
}, [analyticsBrowser]);
return <SlugPage />;
}
return <SlugPage showSingIn={showSingIn} />;
};
export default Home;

1 comment on commit 2b6e8cc

@vercel
Copy link

@vercel vercel bot commented on 2b6e8cc Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.