This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | . | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | . | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <script> | |
| import client from "./sanityClient.js"; | |
| import groq from "groq"; | |
| import {parse, evaluate} from 'groq-js' | |
| import { onMount } from "svelte"; | |
| const query = groq` | |
| *[_type == "cms"]{ | |
| name, | 
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { EventEmitter } from 'events' | |
| import dispatcher from '../dispatcher' | |
| import axios from 'axios' | |
| import uuid from 'uuid4' | |
| class TodoStore extends EventEmitter { | |
| constructor() { | |
| super() | |
| this.state = { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| "todos": [ | |
| { | |
| "complete": "false", | |
| "edit": "false", | |
| "id": "uuid()", | |
| "text": "Go Shopping" | |
| }, | |
| { | |
| "complete": "false", | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { EventEmitter } from 'events' | |
| import dispatcher from '../dispatcher' | |
| import axios from 'axios' | |
| import uuid from 'uuid4' | |
| class TodoStore extends EventEmitter { | |
| constructor() { | |
| super() | |
| this.state = { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import dispatcher from "../dispatcher"; | |
| export function addTodo(text) { | |
| dispatcher.dispatch({ | |
| type: "ADD_TODO", | |
| text, | |
| }); | |
| } | |
| export function deleteTodo(todoToDelete) { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React from 'react' | |
| // Flux | |
| import * as TodoActions from '../../actions/TodoActions' | |
| export default class Todo extends React.Component { | |
| constructor(props) { | |
| super(props) | |
| this.handleDeleteTodo = this.handleDeleteTodo.bind(this) | |
| this.handleCompleteToggle = this.handleCompleteToggle.bind(this) | 
NewerOlder