Skip to content

Instantly share code, notes, and snippets.

View melechi's full-sized avatar

Timothy Chandler melechi

  • Sydney, Australia
View GitHub Profile
import { ApolloClient, createHttpLink, InMemoryCache, ApolloProvider } from '@apollo/client';
import { setContext } from '@apollo/client/link/context';
const HTTPLink = createHttpLink({
uri: process.env.REACT_APP_GAPHQL_SERVER,
});
const authLink = setContext((_, { headers }) => {
// get the authentication token from local storage if it exists
const token = localStorage.getItem('jwtToken');
$JSKK.Class.create
(
{
$namespace: 'app',
$name: 'DD',
$uses:
[
'$JSKK.trait.Configurable',
'$JSKK.trait.Observable'
]
requirejs.config
(
{
baseUrl: '/node_modules',
paths:
{
week5: '/src/week5',
JSKK: 'jskk/bin/jskk.1.3.0.min',
bootstrap: 'bootstrap/dist/js/bootstrap.min',
jquery: 'jquery/dist/jquery.min'
$JSKK.Class.create
(
{
$namespace: 'helper',
$name: 'InstanceTracker'
}
)
(
// Static Block
{
bindContainerEvent: function(event,handler,method,data)
{
return this.bindDOMEvent(event,null,handler,method,data);
},
onGotBaseHTML: function(view)
{
var cmp=this.getParentComponent();
$JSKK.when(cmp.isConfigured.bind(cmp)).isTrue
(
function()
{
view.insertBaseHTML
(
{