diff --git a/client/src/api/index.js b/client/src/api/todo.js similarity index 88% rename from client/src/api/index.js rename to client/src/api/todo.js index 5338045..c38dcf1 100644 --- a/client/src/api/index.js +++ b/client/src/api/todo.js @@ -1,9 +1,8 @@ -import { writable } from 'svelte/store' import axios from 'axios' -axios.defaults.baseURL = '//localhost:8000' +import { todos } from '../stores' -export const todos = writable([]) +axios.defaults.baseURL = '//localhost:8000' export async function refresh() { const { data } = await axios({ diff --git a/client/src/components/Add.svelte b/client/src/components/Add.svelte index 2948d2e..d23eea0 100644 --- a/client/src/components/Add.svelte +++ b/client/src/components/Add.svelte @@ -2,7 +2,7 @@ import Button from './Button.svelte' import Field from './Field.svelte' - import { add } from '../api' + import { add } from '../api/todo.js' let title = '' diff --git a/client/src/components/Button.svelte b/client/src/components/Button.svelte index 978e915..a02c847 100644 --- a/client/src/components/Button.svelte +++ b/client/src/components/Button.svelte @@ -7,11 +7,13 @@ outline: none; border: none; color: hsl(0, 0%, 100%); - background-color: hsl(0, 0%, 0%); + background-color: var(--clr-accent); padding: 0.5em 1em; border-radius: 1em; font-size: inherit; cursor: pointer; + min-width: 5em; + text-align: center; } diff --git a/client/src/components/Field.svelte b/client/src/components/Field.svelte index acfb390..c5555cf 100644 --- a/client/src/components/Field.svelte +++ b/client/src/components/Field.svelte @@ -6,7 +6,7 @@ -