Skip to content

Commit

Permalink
Use approved-apps endpoint for webapp and minor ui fixes (#1320)
Browse files Browse the repository at this point in the history
Related to #1266
  • Loading branch information
beastoin authored Nov 15, 2024
2 parents c6bb774 + e8d3cca commit e6d948d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions frontend/src/app/apps/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const COST_CONSTANT = 0.05;

export default async function PluginDetailView({ params }: { params: { id: string } }) {
// const [darkMode, setDarkMode] = useState(false);
var response = await fetch(`${envConfig.API_URL}/plugins?uid=s5rl6e7nk8cc9rn2`);
var response = await fetch(`${envConfig.API_URL}/v1/approved-apps?include_reviews=true`);
const plugins = (await response.json()) as Plugin[];

// Get params in a server component
Expand Down Expand Up @@ -60,7 +60,7 @@ export default async function PluginDetailView({ params }: { params: { id: strin
<div className="mb-6 flex items-center justify-between">
<Link
href="/apps"
className="flex items-center text-gray-600 transition-colors hover:text-gray-800 dark:text-gray-300 dark:hover:text-white"
className="pt-8 flex items-center text-gray-600 transition-colors hover:text-gray-800 dark:text-gray-300 dark:hover:text-white"
>
<ArrowLeft className="mr-2" />
Back to Apps
Expand All @@ -84,7 +84,7 @@ export default async function PluginDetailView({ params }: { params: { id: strin
<CardHeader>
<div className="mb-4 flex items-center">
<img
src={`https://raw.githubusercontent.com/BasedHardware/Omi/main${plugin.image}`}
src={plugin.image}
alt={plugin.name}
className="mr-6 h-24 w-24 rounded-full object-cover"
/>
Expand All @@ -111,7 +111,7 @@ export default async function PluginDetailView({ params }: { params: { id: strin
<div className="flex flex-col items-center rounded-lg bg-white p-4 shadow dark:bg-gray-800">
<DollarSign className="mb-2 h-8 w-8 text-green-500" />
<span className="text-2xl font-bold text-gray-800 dark:text-white">
${stat.money}
${stat == undefined ? 0 : stat.money}
</span>
<span className="text-gray-600 dark:text-gray-400">Total Earned</span>
</div>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/apps/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default async function SleekPluginList() {
// document.documentElement.classList.remove('dark');
// }
// }, [darkMode]);
var response = await fetch(`${envConfig.API_URL}/plugins?uid=s5rl6e7nk8cc9rn2`);
var response = await fetch(`${envConfig.API_URL}/v1/approved-apps?include_reviews=true`);


const plugins = (await response.json()) as Plugin[];
Expand All @@ -111,7 +111,7 @@ export default async function SleekPluginList() {
return (
<div className="container mx-auto p-4">
<div className="mb-6 flex items-center justify-between">
<h1 className="text-3xl font-bold text-gray-800 dark:text-white">Omi App Marketplace</h1>
<h1 className="pt-6 text-3xl font-bold text-gray-800 dark:text-white">Omi Apps Marketplace</h1>
{/* <button
variant="outline"
size="icon"
Expand Down Expand Up @@ -145,7 +145,7 @@ function PluginCard({ plugin, stat }: { plugin: Plugin, stat?: PluginStat }) {
<div className="flex h-full flex-col p-6">
<div className="mb-4 flex items-center">
<img
src={`https://raw.githubusercontent.com/BasedHardware/Omi/main${plugin.image}`}
src={plugin.image}
alt={plugin.name}
className="mr-4 h-16 w-16 rounded-full object-cover"
/>
Expand Down

0 comments on commit e6d948d

Please sign in to comment.