Add Balancer to ItemCard descriptions, add Balancer Provider to app root

This commit is contained in:
Xevion
2023-02-26 20:15:21 -06:00
parent 2a68287b43
commit df2aa0070a
2 changed files with 16 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ import {useOnClickOutside, useToggle} from "usehooks-ts";
import {classNames, isHoverable} from "../utils/helpers"; import {classNames, isHoverable} from "../utils/helpers";
import DependentImage from "./DependentImage"; import DependentImage from "./DependentImage";
import ReactMarkdown from 'react-markdown' import ReactMarkdown from 'react-markdown'
import Balancer from "react-wrap-balancer";
import Link from "next/link"; import Link from "next/link";
import {useRouter} from "next/router"; import {useRouter} from "next/router";
@@ -59,7 +60,9 @@ const ItemCard = ({banner, bannerBlur, title, description, links, location, bann
e.stopPropagation(); e.stopPropagation();
navigate(); navigate();
}}> }}>
<ReactMarkdown>{description}</ReactMarkdown> <Balancer>
<ReactMarkdown>{description}</ReactMarkdown>
</Balancer>
</div> </div>
</div> </div>
{(links?.length ?? 0) > 0 ? {(links?.length ?? 0) > 0 ?

View File

@@ -1,15 +1,19 @@
import {type AppType} from "next/app"; import { type AppType } from "next/app";
import {trpc} from "../utils/trpc"; import { trpc } from "../utils/trpc";
import "../styles/globals.scss"; import "../styles/globals.scss";
import {Analytics} from "@vercel/analytics/react"; import { Analytics } from "@vercel/analytics/react";
import { Provider } from "react-wrap-balancer";
const MyApp: AppType = ({Component, pageProps}) => { const MyApp: AppType = ({ Component, pageProps }) => {
return <> return (
<>
<Provider>
<Component {...pageProps} /> <Component {...pageProps} />
<Analytics/> </Provider>
</>; <Analytics />
</>
);
}; };
export default trpc.withTRPC(MyApp); export default trpc.withTRPC(MyApp);