Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBacon committed Oct 18, 2023
1 parent 2b99a3b commit 11292c7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 20 deletions.
41 changes: 21 additions & 20 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://evanbacon.dev/faq</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/games</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/lego</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/media</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/talks</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/apple-settings</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/cli-beta</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/cli</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/exotic</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/html-elements</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/router-1</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/router-2</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/router-rc</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/router-rfc</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/run-cmd</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/blog/web-beta</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/expo/search</loc><lastmod>2023-09-03</lastmod></url>
<url><loc>https://evanbacon.dev/expo/showcase</loc><lastmod>2023-09-03</lastmod></url></urlset>
<url><loc>https://evanbacon.dev/faq</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/games</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/lego</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/media</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/talks</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/api-routes-rfc</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/apple-settings</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/cli-beta</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/cli</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/exotic</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/html-elements</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/router-1</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/router-2</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/router-rc</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/router-rfc</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/run-cmd</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/blog/web-beta</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/expo/search</loc><lastmod>2023-10-04</lastmod></url>
<url><loc>https://evanbacon.dev/expo/showcase</loc><lastmod>2023-10-04</lastmod></url></urlset>
22 changes: 22 additions & 0 deletions src/data/getAppStoreData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ export type CategoryItem = {
const altSafe = (name: string) => name.replace('–', '-').replace('’', "'");

export function getAppStoreData(): Record<string, AppItem[]> {
// const mapped = data.reduce((acc, app) => {
// if (!acc[app.category]) {
// acc[app.category] = [];
// }
// acc[app.category].push(app);
// return acc;
// }, {}) as Record<string, AppItem[]>;

// return Object.fromEntries(
// Object.entries(mapped).map(([key, value]) => [
// key,
// uniqeBy(value, 'bundleId').map(value => ({
// ...value,
// name: altSafe(value.name),
// })),
// ])
// );

return Object.fromEntries(
Object.entries(data).map(([key, value]) => [
key,
Expand All @@ -35,6 +53,10 @@ export function getAppStoreData(): Record<string, AppItem[]> {
);
}

function uniqeBy<T>(arr: T[], key: keyof T) {
return arr.filter((v, i, a) => a.findIndex(t => t[key] === v[key]) === i);
}

export function getFrameworks(app: Partial<AppItem>) {
return {
expoSdk: app.matches.find(p => p.match(/(expo*|EXConstants|EXUpdates)/gi)),
Expand Down

0 comments on commit 11292c7

Please sign in to comment.