Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: react wrap balancer #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"react-dom": "18.2.0",
"react-hook-form": "^7.42.0",
"react-hot-toast": "^2.4.0",
"react-use-measure": "^2.1.1"
"react-use-measure": "^2.1.1",
"react-wrap-balancer": "^0.4.0"
},
"devDependencies": {
"@types/node": "18.11.3",
Expand Down
5 changes: 4 additions & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Analytics } from "@vercel/analytics/react";
import type { AppProps } from "next/app";
import "../styles/globals.css";
import { Provider } from "react-wrap-balancer";

function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<Component {...pageProps} />
<Provider>
<Component {...pageProps} />
</Provider>
<Analytics />
</>
);
Expand Down
3 changes: 3 additions & 0 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Github from "../components/GitHub";
import Header from "../components/Header";
import LoadingDots from "../components/LoadingDots";
import ResizablePanel from "../components/ResizablePanel";
import Balancer from "react-wrap-balancer";

const Home: NextPage = () => {
const [loading, setLoading] = useState(false);
Expand Down Expand Up @@ -88,7 +89,9 @@ const Home: NextPage = () => {
<p>Star on GitHub</p>
</a>
<h1 className="sm:text-6xl text-4xl max-w-2xl font-bold text-slate-900">
<Balancer>
Generate your next Twitter bio in seconds
</Balancer>
</h1>
<p className="text-slate-500 mt-5">18,167 bios generated so far.</p>
<div className="max-w-xl">
Expand Down