|
1 | 1 | import type { ProductPost } from "./types"; |
2 | 2 |
|
3 | | -export const PROJECTS: ProductPost[] = [ |
4 | | - { |
5 | | - id: "1", |
| 3 | +let projectCounter = 1; |
| 4 | + |
| 5 | +export function createProject( |
| 6 | + data: Omit<ProductPost, "id" | "topics" | "createdAt" | "votesCount" | "deleted" | "hasAi"> & { |
| 7 | + topics: string[]; |
| 8 | + }, |
| 9 | +): ProductPost { |
| 10 | + const projectId = projectCounter.toString(); |
| 11 | + projectCounter++; |
| 12 | + |
| 13 | + const { topics: topicNames, ...restData } = data; |
| 14 | + |
| 15 | + return { |
| 16 | + id: projectId, |
6 | 17 | hasAi: false, |
7 | | - topics: [ |
8 | | - { |
9 | | - name: "Discord", |
10 | | - description: "", |
11 | | - id: "1", |
12 | | - postId: "1", |
13 | | - }, |
14 | | - { |
15 | | - name: "Tauri", |
16 | | - description: "", |
17 | | - id: "1", |
18 | | - postId: "1", |
19 | | - }, |
20 | | - { |
21 | | - name: "React", |
22 | | - description: "", |
23 | | - id: "1", |
24 | | - postId: "1", |
25 | | - }, |
26 | | - { |
27 | | - name: "Rust", |
28 | | - description: "", |
29 | | - id: "1", |
30 | | - postId: "1", |
31 | | - }, |
32 | | - ], |
33 | 18 | deleted: false, |
34 | | - tagline: "Something about discord? idk", |
| 19 | + votesCount: 0, |
35 | 20 | createdAt: new Date(), |
36 | | - votesCount: 1337, |
37 | | - thumbnailUrl: |
38 | | - "https://raw.githubusercontent.com/overlayeddev/overlayed/main/apps/web/public/favicon_io/apple-touch-icon.png", |
| 21 | + topics: topicNames.map((topicName, index) => ({ |
| 22 | + name: topicName, |
| 23 | + description: "", |
| 24 | + id: `${projectId}-${index + 1}`, |
| 25 | + postId: projectId, |
| 26 | + })), |
| 27 | + ...restData, |
| 28 | + }; |
| 29 | +} |
| 30 | + |
| 31 | +export const PROJECTS: ProductPost[] = [ |
| 32 | + createProject({ |
| 33 | + name: "OGHUNT", |
| 34 | + url: "https://oghunt.com", |
| 35 | + tagline: "Product Hunt with ZERO AI Slop", |
| 36 | + description: "Product Hunt with ZERO AI Slop", |
| 37 | + thumbnailUrl: "https://oghunt.com/icon-128.png", |
| 38 | + topics: ["Product Hunt", "AI", "Next.js"], |
| 39 | + }), |
| 40 | + createProject({ |
39 | 41 | name: "Overlayed", |
40 | 42 | url: "https://overlayed.dev", |
| 43 | + tagline: "Something about discord? idk", |
41 | 44 | description: |
42 | 45 | "See who's speaking in your Discord voice channel with a movable overlay, compatible with almost every game or app", |
43 | | - }, |
44 | | - { |
45 | | - id: "1", |
46 | | - hasAi: false, |
47 | | - topics: [ |
48 | | - { |
49 | | - name: "Job Hunt", |
50 | | - description: "", |
51 | | - id: "1", |
52 | | - postId: "1", |
53 | | - }, |
54 | | - { |
55 | | - name: "Productivity", |
56 | | - description: "", |
57 | | - id: "1", |
58 | | - postId: "1", |
59 | | - }, |
60 | | - { |
61 | | - name: "React", |
62 | | - description: "", |
63 | | - id: "1", |
64 | | - postId: "1", |
65 | | - }, |
66 | | - ], |
67 | | - deleted: false, |
68 | | - tagline: "Easily track job applications", |
69 | | - createdAt: new Date(), |
70 | | - votesCount: 1337, |
71 | | - thumbnailUrl: "https://my.flosa.app/img/logo-ball.png", |
| 46 | + thumbnailUrl: |
| 47 | + "https://raw.githubusercontent.com/overlayeddev/overlayed/main/apps/web/public/favicon_io/apple-touch-icon.png", |
| 48 | + topics: ["Discord", "Tauri", "React", "Rust"], |
| 49 | + }), |
| 50 | + createProject({ |
72 | 51 | name: "Flosa", |
73 | 52 | url: "https://flosa.app", |
| 53 | + tagline: "Easily track job applications", |
74 | 54 | description: |
75 | 55 | "Flosa is a website designed to help users organize their job search process. It allows users to track applications, update statuses, visualize progress with a Sankey diagram, manage contacts and use a browser extension to save jobs from over 1,000 supported websites.", |
76 | | - }, |
77 | | - { |
78 | | - id: "1", |
79 | | - hasAi: false, |
80 | | - topics: [ |
81 | | - { |
82 | | - name: "Seattle", |
83 | | - description: "", |
84 | | - id: "1", |
85 | | - postId: "1", |
86 | | - }, |
87 | | - { |
88 | | - name: "Food", |
89 | | - description: "", |
90 | | - id: "1", |
91 | | - postId: "1", |
92 | | - }, |
93 | | - { |
94 | | - name: "Svelte", |
95 | | - description: "", |
96 | | - id: "1", |
97 | | - postId: "1", |
98 | | - }, |
99 | | - ], |
100 | | - deleted: false, |
101 | | - tagline: "See the health inspection results of Seattle restaurants", |
102 | | - createdAt: new Date(), |
103 | | - votesCount: 42069, |
104 | | - thumbnailUrl: "https://www.seattlesafeeats.com/favicon.png", |
| 56 | + thumbnailUrl: "https://my.flosa.app/img/logo-ball.png", |
| 57 | + topics: ["Job Hunt", "Productivity", "React"], |
| 58 | + }), |
| 59 | + createProject({ |
105 | 60 | name: "Seattle Safe Eats", |
106 | 61 | url: "https://seattlesafeeats.com", |
| 62 | + tagline: "See the health inspection results of Seattle restaurants", |
107 | 63 | description: |
108 | 64 | "Seattle Safe Eats is a tool that helps you find restaurants that have passed health inspections in Seattle.", |
109 | | - }, |
110 | | - { |
111 | | - id: "1", |
112 | | - hasAi: false, |
113 | | - topics: [ |
114 | | - { |
115 | | - name: "Spotify", |
116 | | - description: "", |
117 | | - id: "1", |
118 | | - postId: "1", |
119 | | - }, |
120 | | - { |
121 | | - name: "Music", |
122 | | - description: "", |
123 | | - id: "1", |
124 | | - postId: "1", |
125 | | - }, |
126 | | - { |
127 | | - name: "React", |
128 | | - description: "", |
129 | | - id: "1", |
130 | | - postId: "1", |
131 | | - }, |
132 | | - ], |
133 | | - deleted: false, |
134 | | - tagline: "A clean and simple way to share your Spotify stats", |
135 | | - createdAt: new Date(), |
136 | | - votesCount: 69420, |
137 | | - thumbnailUrl: "https://splist.fm/android-chrome-192x192.png", |
| 65 | + thumbnailUrl: "https://www.seattlesafeeats.com/favicon.png", |
| 66 | + topics: ["Seattle", "Food", "Svelte"], |
| 67 | + }), |
| 68 | + createProject({ |
138 | 69 | name: "Splist.fm", |
139 | 70 | url: "https://splist.fm/", |
| 71 | + tagline: "A clean and simple way to share your Spotify stats", |
140 | 72 | description: |
141 | 73 | "share your spotify playlists with friends and family so that they know you listen to good music", |
142 | | - }, |
143 | | - { |
144 | | - id: "1", |
145 | | - hasAi: false, |
146 | | - topics: [ |
147 | | - { |
148 | | - name: "Astro", |
149 | | - description: "", |
150 | | - id: "1", |
151 | | - postId: "1", |
152 | | - }, |
153 | | - { |
154 | | - name: "Markdown", |
155 | | - description: "", |
156 | | - id: "1", |
157 | | - postId: "1", |
158 | | - }, |
159 | | - { |
160 | | - name: "Food", |
161 | | - description: "", |
162 | | - id: "1", |
163 | | - postId: "1", |
164 | | - }, |
165 | | - ], |
166 | | - deleted: false, |
167 | | - tagline: "Recipes made by an Australian chef", |
168 | | - createdAt: new Date(), |
169 | | - votesCount: 420, |
170 | | - thumbnailUrl: "https://cook-around-find-out-v2.vercel.app/logo-1000.jpg", |
| 74 | + thumbnailUrl: "https://splist.fm/android-chrome-192x192.png", |
| 75 | + topics: ["Spotify", "Music", "React"], |
| 76 | + }), |
| 77 | + createProject({ |
171 | 78 | name: "Cook Around and Find Out", |
172 | 79 | url: "https://cook-around-find-out-v2.vercel.app/", |
| 80 | + tagline: "Recipes made by an Australian chef", |
173 | 81 | description: |
174 | 82 | "Published recipes that I have piss-farted around with or found online and changed to my liking", |
175 | | - }, |
| 83 | + thumbnailUrl: "https://cook-around-find-out-v2.vercel.app/logo-1000.jpg", |
| 84 | + topics: ["Astro", "Markdown", "Food"], |
| 85 | + }), |
176 | 86 | ]; |
0 commit comments