11import { type NextPageContext } from 'next' ;
22import { useRouter } from 'next/router' ;
33import { type ParsedUrlQuery } from 'node:querystring' ;
4- import { StyleSheet } from 'react-native' ;
54
65import ContentContainer from '~/components/ContentContainer' ;
76import Libraries from '~/components/Libraries' ;
@@ -11,6 +10,7 @@ import Pagination from '~/components/Pagination';
1110import Search from '~/components/Search' ;
1211import { type APIResponseType } from '~/types' ;
1312import getApiUrl from '~/util/getApiUrl' ;
13+ import tw from '~/util/tailwind' ;
1414import urlWithQuery from '~/util/urlWithQuery' ;
1515
1616type Props = {
@@ -21,11 +21,12 @@ type Props = {
2121function Index ( { data, query } : Props ) {
2222 const router = useRouter ( ) ;
2323 const total = data . total ?? 0 ;
24+
2425 return (
2526 < >
2627 < PageMeta searchQuery = { router . query ?. search } />
2728 < Navigation header = { < Search query = { router . query } total = { total } /> } />
28- < ContentContainer style = { styles . container } >
29+ < ContentContainer style = { tw `px-4 py-3` } >
2930 < Pagination query = { query } total = { total } />
3031 < Libraries libraries = { data && data . libraries } />
3132 < Pagination query = { query } total = { total } />
@@ -45,11 +46,4 @@ Index.getInitialProps = async (ctx: NextPageContext) => {
4546 } ;
4647} ;
4748
48- const styles = StyleSheet . create ( {
49- container : {
50- paddingHorizontal : 16 ,
51- paddingVertical : 12 ,
52- } ,
53- } ) ;
54-
5549export default Index ;
0 commit comments