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 { authClient } from "../sanity/sanity-config.auth.server"; | |
type Response = Fylke[]; | |
interface Fylke { | |
avgrensningsboks: Avgrensningsboks; | |
fylkesnavn: string; | |
fylkesnummer: string; | |
kommuner: Kommuner[]; | |
} |
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 { urlFor } from "@lib/sanity" | |
import { getImageDimensions } from "@sanity/asset-utils" | |
import { | |
SanityImageObject, | |
SanityImageSource, | |
} from "@sanity/image-url/lib/types/types" | |
import Image from "next/image" | |
import { | |
SanityReference, | |
SanityImageAsset, |
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, { useState, useEffect, useRef } from 'react' | |
import { urlFor } from '../lib/api' | |
import useWindowDimensions from '../hooks/useWindowDimensions' | |
/* TODO: Add fallback image */ | |
function LazyImage({ | |
className, | |
image, | |
desktopSizePercent = 100, |
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
# Requires WP Cli and access to Local SSH, can be opened through Local GUI | |
# Need .env file in directory with format: | |
#SSH_USER=demo | |
#SSH_SERVER=ssh.url | |
#LIVE_SITE_URL=https://live.url | |
#LOCAL_SITE_URL=http://local.local | |
# get-env.sh | |
SSH_USER=$(grep SSH_USER .env | xargs) | |
SSH_USER=${SSH_USER#*=} |
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
<?php | |
// Needs to run when creating order | |
// Also needs to run when editing a ticket | |
function create_users_from_ticket($order_id) | |
{ | |
if (!wc_get_order($order_id)) { | |
return; | |
} |