Skip to content

Commit

Permalink
Type/appcontext (#135)
Browse files Browse the repository at this point in the history
* type app context

* fmt

* remove vendor
  • Loading branch information
guitavano authored Feb 7, 2024
1 parent 11c2a8e commit c356c16
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { color as wake } from "apps/wake/mod.ts";
import { color as linx } from "apps/linx/mod.ts";
import { color as nuvemshop } from "apps/nuvemshop/mod.ts";
import { Section } from "deco/blocks/section.ts";
import { App } from "deco/mod.ts";
import type { App as A, AppContext as AC } from "deco/mod.ts";
import { rgb24 } from "std/fmt/colors.ts";
import manifest, { Manifest } from "../manifest.gen.ts";

Expand All @@ -31,6 +31,9 @@ export type Platform =

export let _platform: Platform = "custom";

export type App = ReturnType<typeof Site>;
export type AppContext = AC<App>;

const color = (platform: string) => {
switch (platform) {
case "vtex":
Expand All @@ -56,7 +59,7 @@ let firstRun = true;

export default function Site(
{ theme, ...state }: Props,
): App<Manifest, Props, [ReturnType<typeof commerce>]> {
): A<Manifest, Props, [ReturnType<typeof commerce>]> {
_platform = state.platform || state.commerce?.platform || "custom";

// Prevent console.logging twice
Expand Down
Binary file removed static/icon-v2-192x192.png
Binary file not shown.
Binary file removed static/icon-v2-256x256.png
Binary file not shown.
Binary file removed static/icon-v2-384x384.png
Binary file not shown.
Binary file removed static/icon-v2-512x512.png
Binary file not shown.

0 comments on commit c356c16

Please sign in to comment.