Skip to content

Commit b89312d

Browse files
authored
correct matadata, fix link target, update libs data and dependencies (#1820)
1 parent 7891c91 commit b89312d

File tree

12 files changed

+428
-715
lines changed

12 files changed

+428
-715
lines changed

bun.lock

Lines changed: 355 additions & 594 deletions
Large diffs are not rendered by default.

common/styleguide.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export const A = ({ href, target = '_blank', children, style, hoverStyle, ...res
152152
<HtmlElements.A
153153
{...rest}
154154
href={href}
155+
target={target}
155156
hrefAttrs={{ target }}
156157
style={[linkStyles, isHovered && linkHoverStyles, style, isHovered && hoverStyle]}>
157158
{children}

components/PageMeta.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ const PageMeta = ({ title, query, path, description = site.description }: PageMe
3030

3131
<meta property="og:title" content={pageTitle} />
3232
<meta property="og:description" content={finalDescription} />
33-
<meta property="og:site_name" content={site.title} />
34-
<meta property="og:type" content="website" />
35-
<meta property="og:url" content="https://reactnative.directory" />
3633
<meta property="og:image" content={socialImage} />
3734
<meta property="og:image:width" content="1280" />
3835
<meta property="og:image:height" content="669" />
@@ -42,9 +39,6 @@ const PageMeta = ({ title, query, path, description = site.description }: PageMe
4239
<meta name="twitter:card" content="summary_large_image" />
4340
<meta name="twitter:image" content={socialImage} />
4441

45-
<meta name="application-name" content={site.title} />
46-
<meta name="msapplication-TileColor" content="#20232a" />
47-
4842
<link rel="canonical" href={`https://reactnative.directory${path ? `/${path}` : ''}`} />
4943
</Head>
5044
);

components/Search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type Props = {
2020
};
2121

2222
const Search = ({ query, total }: Props) => {
23-
const { search, order, direction, ...filterParams } = query;
23+
const { search, order, direction, offset, ...filterParams } = query;
2424
const [isInputFocused, setInputFocused] = useState(false);
2525
const [isFilterVisible, setFilterVisible] = useState(Object.keys(filterParams).length > 0);
2626
const [isApple, setIsApple] = useState<boolean | null>(null);

components/StructuredData.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
import Head from 'next/head';
2-
31
type Props = {
42
data: Record<string, any>;
53
};
64

75
export function StructuredData({ data }: Props) {
86
return (
9-
<Head>
10-
<script
11-
key="structured-data"
12-
type="application/ld+json"
13-
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
14-
/>
15-
</Head>
7+
<script
8+
key="structured-data"
9+
type="application/ld+json"
10+
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
11+
/>
1612
);
1713
}

components/Tag.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ReactNode, useContext } from 'react';
1+
import { ReactElement, useContext } from 'react';
22
import { StyleSheet, View, ViewStyle } from 'react-native';
33

44
import { colors, darkColors, Label } from '~/common/styleguide';
@@ -9,7 +9,7 @@ import { Check } from './Icons';
99
type Props = {
1010
label: string;
1111
tagStyle: ViewStyle;
12-
icon?: ReactNode;
12+
icon?: ReactElement;
1313
};
1414

1515
export const Tag = ({

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,42 @@
2525
"@react-native-picker/picker": "^2.11.1",
2626
"@sentry/react": "^9.40.0",
2727
"@vercel/blob": "^0.27.3",
28-
"expo": "54.0.0-canary-20250713-8f814f8",
29-
"expo-font": "13.4.0-canary-20250713-8f814f8",
28+
"expo": "54.0.0-canary-20250729-d8899ae",
29+
"expo-font": "13.4.0-canary-20250811-5c940c0",
3030
"lodash": "^4.17.21",
31-
"next": "^15.4.2",
31+
"next": "^15.4.6",
3232
"node-emoji": "^2.2.0",
33-
"react": "19.1.0",
33+
"react": "19.1.1",
3434
"react-content-loader": "^7.1.1",
35-
"react-dom": "19.1.0",
35+
"react-dom": "19.1.1",
3636
"react-easy-linkify": "^1.0.8",
37-
"react-native": "0.80.1",
37+
"react-native": "0.81.0",
3838
"react-native-safe-area-context": "5.5.2",
39-
"react-native-svg": "^15.12.0",
40-
"react-native-web": "^0.20.0",
39+
"react-native-svg": "^15.12.1",
40+
"react-native-web": "^0.21.0",
4141
"use-debounce": "^10.0.5"
4242
},
4343
"devDependencies": {
4444
"@expo/next-adapter": "^6.0.0",
45-
"@next/bundle-analyzer": "^15.4.2",
46-
"@types/bun": "^1.2.19",
45+
"@next/bundle-analyzer": "^15.4.6",
46+
"@types/bun": "^1.2.20",
4747
"@types/lodash": "^4.17.20",
48-
"@types/react": "~19.1.8",
48+
"@types/react": "~19.1.10",
4949
"ajv-cli": "^5.0.0",
50-
"browserslist": "^4.25.1",
51-
"cheerio": "^1.1.0",
50+
"browserslist": "^4.25.2",
51+
"cheerio": "^1.1.2",
5252
"cross-fetch": "^4.1.0",
53-
"dotenv": "^17.2.0",
54-
"eslint": "^9.31.0",
55-
"eslint-config-next": "^15.4.2",
53+
"dotenv": "^17.2.1",
54+
"eslint": "^9.33.0",
55+
"eslint-config-next": "^15.4.6",
5656
"eslint-config-universe": "^15.0.3",
5757
"lint-staged": "^15.5.1",
5858
"next-compose-plugins": "^2.2.1",
5959
"next-fonts": "^1.5.1",
6060
"next-images": "^1.8.5",
6161
"prettier": "^3.6.2",
62-
"simple-git-hooks": "^2.13.0",
63-
"typescript": "^5.8.3",
62+
"simple-git-hooks": "^2.13.1",
63+
"typescript": "^5.9.2",
6464
"user-agent-data-types": "^0.4.2"
6565
},
6666
"private": true,

pages/_document.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Document, { DocumentContext, Html, Head, Main, NextScript } from 'next/document';
22

33
import GoogleAnalytics from '~/components/GoogleAnalytics';
4+
import { StructuredData } from '~/components/StructuredData';
45

56
class DirectoryWebsite extends Document {
67
static async getInitialProps(ctx: DocumentContext) {
@@ -22,6 +23,30 @@ class DirectoryWebsite extends Document {
2223

2324
<link rel="manifest" href="/manifest.json" />
2425
<link rel="apple-touch-icon" sizes="180x180" type="image/png" href="/icon-180px.png" />
26+
<meta name="msapplication-TileColor" content="#20232a" />
27+
28+
<meta name="application-name" content="React Native Directory" />
29+
<meta property="og:site_name" content="React Native Directory" />
30+
31+
<meta property="og:type" content="website" />
32+
<meta property="og:url" content="https://reactnative.directory" />
33+
34+
<StructuredData
35+
data={{
36+
'@context': 'https://schema.org',
37+
'@type': 'WebSite',
38+
name: 'React Native Directory',
39+
url: 'https://reactnative.directory/',
40+
potentialAction: {
41+
'@type': 'SearchAction',
42+
target: {
43+
'@type': 'EntryPoint',
44+
urlTemplate: 'https://reactnative.directory/?search={search_term_string}',
45+
},
46+
'query-input': 'required name=search_term_string',
47+
},
48+
}}
49+
/>
2550
</Head>
2651
<body>
2752
<Main />

pages/index.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import Navigation from '~/components/Navigation';
1010
import PageMeta from '~/components/PageMeta';
1111
import Pagination from '~/components/Pagination';
1212
import Search from '~/components/Search';
13-
import { StructuredData } from '~/components/StructuredData';
1413
import getApiUrl from '~/util/getApiUrl';
1514
import urlWithQuery from '~/util/urlWithQuery';
1615

@@ -37,22 +36,6 @@ const Index = ({ data, query }) => {
3736
const total = data && data.total;
3837
return (
3938
<>
40-
<StructuredData
41-
data={{
42-
'@context': 'https://schema.org',
43-
'@type': 'WebSite',
44-
name: 'React Native Directory',
45-
url: 'https://reactnative.directory/',
46-
potentialAction: {
47-
'@type': 'SearchAction',
48-
target: {
49-
'@type': 'EntryPoint',
50-
urlTemplate: 'https://reactnative.directory/?search={search_term_string}',
51-
},
52-
'query-input': 'required name=search_term_string',
53-
},
54-
}}
55-
/>
5639
<PageMeta query={router.query?.search} />
5740
<Navigation noHeader />
5841
<Search query={router.query} total={total} />

0 commit comments

Comments
 (0)