This file contains 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
<html lang="pt-br"> | |
<head> | |
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"> | |
<meta name="theme-color" content="#000000"> | |
<link href="https://fonts.googleapis.com/css?family=Nunito:200,300,400,600,700,800,900|Open+Sans+Condensed:300,300i,700|Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet"> | |
<title>My Cool App ;)</title> | |
<style type="text/css"> | |
body { | |
background-color: #F2F4F5; | |
text-align: center; |
This file contains 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
defmodule MyAppWeb.ErrorView do | |
use MyAppWeb, :view | |
def template_not_found(template, _assigns) do | |
%{errors: %{detail: Phoenix.Controller.status_message_from_template(template)}} | |
end | |
end |
This file contains 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
defmodule MyAppWeb.Plug.Authorization do | |
@behaviour Plug | |
import Plug.Conn | |
def init(opts), do: opts | |
def call(conn, _) do | |
with {:ok, token} <- token(conn), | |
{:ok, current_user} <- authorize(token) do |
This file contains 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' | |
import PropTypes from 'prop-types' | |
import axios from 'axios' | |
class H5PVideoState { | |
constructor(h5pVideoClass) { | |
this.h5pVideoClass = h5pVideoClass | |
this.lastState = null | |
this.lastCurrentTime = null |
This file contains 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' | |
import PropTypes from 'prop-types' | |
import axios from 'axios' | |
const H5pContent = ({ iframeSrc }) => { | |
const handleContentRef = dom => { | |
if (dom) { | |
dom.onload = () => { | |
dom.contentWindow.H5P.externalDispatcher.on('xAPI', function(event) { | |
console.log('INITIAL STATEMENT ON externalDispatcher') |
This file contains 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' | |
import PropTypes from 'prop-types' | |
const H5pContent = ({ iframeSrc }) => { | |
const handleContentRef = dom => { | |
if (dom) { | |
dom.onload = () => { | |
dom.contentWindow.H5P.externalDispatcher.on('xAPI', function(event) { | |
console.log('INITIAL STATEMENT ON externalDispatcher') | |
console.log(event.data.statement) |
This file contains 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' | |
import { mount } from 'enzyme' | |
import { MockedProvider } from "react-apollo/test-utils" | |
import { InMemoryCache } from 'apollo-cache-inmemory' | |
import { BrowserRouter } from 'react-router-dom' | |
import { TrailDetails } from 'views' | |
import { GRAPHQL_MOCKS_TRAILS } from '__mocks__/TrailDetails/GraphqlMocks.js' | |
import {IntrospectionFragmentMatcher} from 'apollo-cache-inmemory'; | |
import introspectionQueryResultData from '../../../mobyGraphqlSchema.json'; |