diff --git a/components/Library/index.tsx b/components/Library/index.tsx
index ba5e2e0e..f92df739 100644
--- a/components/Library/index.tsx
+++ b/components/Library/index.tsx
@@ -5,6 +5,7 @@ import { isEmptyOrNull } from '../../util/strings';
import { colors, layout, A, Label, Caption } from '../../common/styleguide';
import { Badge } from '../Icons';
import { CompatibilityTags } from '../CompatibilityTags';
+import { Topics } from '../Topics';
import { MetaData } from './MetaData';
type Props = {
@@ -21,6 +22,7 @@ export default function Library(props: Props) {
{library.github.name}
+
{library.goldstar && (
@@ -31,6 +33,9 @@ export default function Library(props: Props) {
+
+
+
{!isEmptyOrNull(library.github.description) && (
{library.github.description}
diff --git a/components/Search.tsx b/components/Search.tsx
index fcb5c568..a662f3b3 100644
--- a/components/Search.tsx
+++ b/components/Search.tsx
@@ -30,7 +30,7 @@ export default function Search(props: Props) {
onChangeText={debouncedCallback}
placeholder="Search libraries..."
style={styles.textInput}
- defaultValue={query && query.search}
+ value={query && query.search ? query.search : ''}
placeholderTextColor={colors.gray4}
/>
diff --git a/components/Topics.tsx b/components/Topics.tsx
new file mode 100644
index 00000000..82679aae
--- /dev/null
+++ b/components/Topics.tsx
@@ -0,0 +1,51 @@
+import React from 'react';
+import { View, StyleSheet, TouchableOpacity } from 'react-native';
+import Router, { useRouter } from 'next/router';
+import { useDebouncedCallback } from 'use-debounce';
+import { Library } from '../types';
+import { colors, Label } from '../common/styleguide';
+import urlWithQuery from '../util/urlWithQuery';
+
+type Props = {
+ library: Library;
+};
+
+export function Topics(props: Props) {
+ const { library } = props;
+ const { topics } = library.github;
+ const router = useRouter();
+ const [debouncedCallback] = useDebouncedCallback(text => {
+ Router.replace(urlWithQuery('/', { ...router.query, search: text, offset: null }));
+ }, 150);
+ return (
+
+ {topics.map(topic => (
+ debouncedCallback(topic)}>
+
+
+ ))}
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ flexWrap: 'wrap',
+ marginBottom: -4,
+ },
+ tag: {
+ alignItems: 'center',
+ backgroundColor: colors.primaryDark,
+ marginRight: 8,
+ borderRadius: 2,
+ paddingHorizontal: 5,
+ paddingVertical: 5,
+ marginBottom: 4,
+ cursor: 'pointer',
+ },
+ text: {
+ color: colors.white,
+ },
+});