Skip to content

Commit

Permalink
whoops typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeerArsala committed Jun 5, 2024
1 parent 8271db8 commit f7ea93e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion frontend/src/data/stores.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { atom, map } from "nanostores";
import { persistentAtom, persistentMap } from "@nanostores/persistent";

import { type Community } from "$lib/types/core";

// Web stores
const numGitHubStars = persistentAtom("num_github_stars");

Expand Down Expand Up @@ -33,4 +35,7 @@ export const userID = persistentAtom("user_id"); //, null);

// Core stores
// stores relating to the core of the application
export const community = atom({id: -1, name: ""});
export const community = persistentAtom<Community>('active_community', {id: -1, name: ""}, {
encode: JSON.stringify,
decode: JSON.parse
});
2 changes: 1 addition & 1 deletion frontend/src/pages/society/index.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import DefaultLayout from "@layouts/DefaultLayoutWithHeader.astro";
import DefaultLayout from "@layouts/DefaultLayout.astro";
export const prerender = false;
---
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/types/core.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface Community {
id: number,
name: string
}

export { type Community };

0 comments on commit f7ea93e

Please sign in to comment.