getServerSideProps
301 )
302}
303
304export const getServerSideProps: GetServerSideProps<Record<string, unknown>, '/search/[...params]'> = async ({305 locale,
306 query,
307 req,
SearchResults
103)
104NoResults.displayName = 'NoResults'
105
106const SearchResults = () => {107 const router = useRouter<'/search/[...params]'>()
108 const { searchState, searchStateActions } = useSearchState()
109 const theme = useMantineTheme()
getStaticProps
152 fallback: 'blocking',
153 }
154}
155export const getStaticProps = async ({156 params,
157 locale,
158}: GetStaticPropsContext<RoutedQuery<'/search/intl/[country]'>>) => {
getStaticPaths
146 </>
147 )
148}
149export const getStaticPaths: GetStaticPaths = async () => {150 return {
151 paths: [],
152 fallback: 'blocking',
OutsideServiceArea
70
71const notBlank = (value?: string) => !!value && value.length > 0
72
73const OutsideServiceArea = () => { 74 const [loading, setLoading] = useState(false)
75 const { classes } = useStyles()
76 const variants = useCustomVariant()
It is recommended to have documentation comments above, or right inside a function/class declaration. This helps developers, users and even the author understand the purpose of a code snippet or API function in the future.
NOTE: If you want to stop this issue from getting raised on certain constructs (arrow functions, class expressions, methods etc.), consider using the skipdoccoverage option under the analyzers.meta
property in your .deepsource.toml
file.
For example, the following configuration will silence this issue for class expressions and method definitions:
[analyzers.meta]
skip_doc_coverage = ["class-expression", "method-definition"]
function sum(a, b) {
return a + b;
}
/**
* Function to add two numbers
* @param a The first number to add
* @param b The second number to add
* @returns The sum of two numbers
*/
function sum(a, b) {
return a + b;
}