Skip to content

Commit

Permalink
Fix Pool Page via pre-render (#1502)
Browse files Browse the repository at this point in the history
* poolid fix

* pool id

* fix pool page

* yarn lint

* remove package.json changes

---------

Co-authored-by: Trajan0x <[email protected]>
  • Loading branch information
trajan0x and trajan0x authored Oct 27, 2023
1 parent 2e0433b commit d8bcb90
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion packages/synapse-interface/pages/pool/[poolId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,23 @@ import { RootState } from '@/store/store'
import { resetPoolDeposit } from '@/slices/poolDepositSlice'
import { resetPoolWithdraw } from '@/slices/poolWithdrawSlice'
import LoadingDots from '@/components/ui/tailwind/LoadingDots'
import { fetchPoolUserData } from '@/slices/poolUserDataSlice'
import { POOL_BY_ROUTER_INDEX } from "@constants/tokens";

export const getStaticPaths = (async () => {
const paths = Object.keys(POOL_BY_ROUTER_INDEX).map((key) => ({
params: { poolId: key }
}));

return {
paths,
fallback: false, // false or "blocking"
}
});

export const getStaticProps = (async (context) => {
return { props: { } }
})


const PoolPage = () => {
const router = useRouter()
Expand All @@ -24,6 +40,7 @@ const PoolPage = () => {

const { pool, isLoading } = useSelector((state: RootState) => state.poolData)


const dispatch: any = useDispatch()

useEffect(() => {
Expand Down

0 comments on commit d8bcb90

Please sign in to comment.