File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ const PostForm = () => {
3939 } ,
4040 onSuccess ( ) {
4141 setText ( '' ) ;
42+ setImagePaths ( [ ] ) ;
4243 queryClient . refetchQueries ( 'posts' ) ;
4344 } ,
4445 onSettled ( ) {
Original file line number Diff line number Diff line change 11// hashtag/[tag].js
2- import { GetStaticPropsContext } from 'next' ;
2+ import { GetStaticPathsContext , GetStaticPropsContext } from 'next' ;
33import React , { useEffect } from 'react' ;
44import { useInView } from 'react-intersection-observer' ;
55import { dehydrate , QueryClient , useInfiniteQuery } from 'react-query' ;
@@ -52,6 +52,13 @@ const Hashtag = () => {
5252 ) ;
5353} ;
5454
55+ export const getStaticPaths = async ( ) => {
56+ return {
57+ paths : [ ] ,
58+ fallback : true ,
59+ } ;
60+ } ;
61+
5562export const getStaticProps = async ( context : GetStaticPropsContext ) => {
5663 const queryClient = new QueryClient ( ) ;
5764 const tag = context . params ?. tag as string ;
Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ const UserPosts = () => {
9090 ) ;
9191} ;
9292
93+ export const getStaticPaths = async ( ) => {
94+ return {
95+ paths : [ ] ,
96+ fallback : true ,
97+ } ;
98+ } ;
99+
93100export const getStaticProps = async ( context : GetStaticPropsContext ) => {
94101 const queryClient = new QueryClient ( ) ;
95102 const id = context . params ?. id as string ;
You can’t perform that action at this time.
0 commit comments