Skip to content

Commit

Permalink
Merge pull request #167 from starboardcoop/0.2.0
Browse files Browse the repository at this point in the history
0.2.0
  • Loading branch information
mdantuono authored Jun 1, 2021
2 parents f8e4d75 + 00ebb7a commit 500d23b
Show file tree
Hide file tree
Showing 21 changed files with 92 additions and 454 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"cross-env": "^7.0.3",
"encoding": "^0.1.13",
"express": "^4.17.1",
"libphonenumber-js": "^1.9.12",
"netlify-lambda": "^2.0.3",
"node-fetch": "^2.6.1",
"polka": "next",
Expand All @@ -45,7 +44,6 @@
"sapper": "^0.28.0",
"svelte": "^3.35.0",
"svelte-preprocess": "^4.6.9",
"svelte-typewriter": "^2.4.5",
"tailwindcss": "^2.0.3"
}
}
24 changes: 0 additions & 24 deletions src/components/Button.svelte

This file was deleted.

7 changes: 0 additions & 7 deletions src/components/Container.svelte

This file was deleted.

8 changes: 0 additions & 8 deletions src/components/Error.svelte

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/Grid.svelte

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export let title = null;
</script>

<header class="w-full p-4 flex flex-col space-y-8 justify-center bg-long-city bg-cover border-b-2 border-gray-200">
<header class="w-full p-4 flex flex-col space-y-8 justify-center bg-long-city bg-cover border-b-2 border-bg">
<Row center>
<a href="/">
<img src="/PVD_Things_Logo_White.png" alt="PVD Things" class="h-14 md:h-20 lg:h-24"/>
Expand Down
31 changes: 0 additions & 31 deletions src/components/Heading.svelte

This file was deleted.

13 changes: 0 additions & 13 deletions src/components/Section.svelte

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Spacer.svelte

This file was deleted.

14 changes: 0 additions & 14 deletions src/components/Spanner.svelte

This file was deleted.

22 changes: 0 additions & 22 deletions src/components/Subheading.svelte

This file was deleted.

14 changes: 0 additions & 14 deletions src/components/Terminal.svelte

This file was deleted.

21 changes: 0 additions & 21 deletions src/lib/phone.js

This file was deleted.

29 changes: 29 additions & 0 deletions src/routes/_api/things.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
async function getAll() {
let data;
let now = new Date();

let previousRefresh = new Date(localStorage.getItem("previousRefresh"));
if (Math.abs(now - previousRefresh) > 120000) {
data = _getAll();
localStorage.setItem("previousRefresh", now.toUTCString());
} else {
data = JSON.parse(localStorage.getItem("data"));

console.log('Previous data refreshed.');
}

return data;
}

async function _getAll() {
const result = await fetch(`/.netlify/functions/things`);
let data = await result.json();
localStorage.setItem("data", JSON.stringify(data));

console.log('Refreshed data from API.');
return data;
}

export default {
getAll
}
2 changes: 0 additions & 2 deletions src/routes/_layout.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<script>
import Layout from "../components/Layout.svelte";
import Footer from "../components/Footer.svelte";
import Menu from "../components/Menu.svelte";
</script>

<Layout>
<Menu />
<div class="flex-grow">
<slot />
</div>
Expand Down
87 changes: 0 additions & 87 deletions src/routes/browse.svelte

This file was deleted.

51 changes: 0 additions & 51 deletions src/routes/donations.svelte

This file was deleted.

Loading

0 comments on commit 500d23b

Please sign in to comment.