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 { ApolloClient, InMemoryCache } from '@apollo/client'; | |
import config from '../config'; | |
export const client = new ApolloClient({ | |
uri: `https://${config.SANITY_PROJECT_ID}.apicdn.sanity.io/v1/graphql/${config.SANITY_DATASET}/${config.SANITY_TAG}`, | |
cache: new InMemoryCache(), | |
headers: { | |
Authorization: `Bearer ${config.SANITY_TOKEN}`, | |
}, | |
} |
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" | |
const BasicSSRExample = () => ( | |
<main> | |
<h1>Teknisk sett SSR</h1> | |
<p>Det er ikke noe server side rendered innhold, men teknisk sett SSR</p> | |
</main> | |
) | |
export getServerData() { | |
return { |
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
// Example created from alv.no | |
import React from 'react'; | |
import Layout from '../components/layout'; | |
import { Title, IntroContainer, BlogSection } from 'shared-components'; | |
import { graphql } from 'gatsby'; | |
import { getBlogDataServerSide } from '../hooks/useBlogQueryServerSide'; | |
const Blog = ({ data, serverData }) => { | |
const layoutData = { | |
...data.sanitySiteSettings, |
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 {OvertimeVisualizer} from "overtime-visualizer"; | |
... | |
Vue.config.ignoredElements = [OvertimeVisualizer.name]; | |
... |
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
<template> | |
<div ref="cl" class="color-list"> | |
<div | |
v-for="color in filteredColors" | |
:key="color.priority" | |
:style="createWidthString(color)" | |
class="color-bar" | |
> | |
<template v-if="color.value > 0"> | |
<div class="color-bar-content"> |