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 { AuthProvider, useAuth } from "@redwoodjs/auth"; | |
import { ClerkProvider, useClerk, useUser as useClerkUser } from "@clerk/clerk-react"; | |
import { FatalErrorBoundary, RedwoodProvider } from "@redwoodjs/web"; | |
import { RedwoodApolloProvider } from "@redwoodjs/web/apollo"; | |
import FatalErrorPage from "src/pages/FatalErrorPage"; | |
import Routes from "src/Routes"; | |
import "./index.css"; | |
import { navigate } from "@redwoodjs/router"; |
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
/** | |
* This is a rewrite of the firebase/firebaseui-web-react auth button | |
* so that it supports Next.js's requirement that no css be imported | |
* in the node_modules directory. Instead, you should use this component | |
* and make sure that you add this import to your page file: | |
* > import "<path to>/node_modules/firebaseui/dist/firebaseui.css"; | |
* | |
* This rewrite was done by Zack Sheppard (@zackdotcomputer) in Feb 2021. | |
* It is relicensed under Google's Apache 2 License below. | |
*/ |
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
// Created by Zack Sheppard (@zackdotcomputer) on 1/19/2021 | |
// Freely available under MIT License | |
// Workaround for https://github.com/vercel/next.js/issues/5533 | |
import Link, { LinkProps } from "next/link"; | |
import { AnchorHTMLAttributes, PropsWithChildren } from "react"; | |
type PropTypes = LinkProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href">; | |
/// A unified component for the next/link <Link> and a standard <a> anchor. |
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
// | |
// Decodable+Graceful.swift | |
// Graceful Decodable | |
// | |
// Created by Zack Sheppard on 9/10/20. | |
// Copyright © 2020 Zack Sheppard. All rights reserved. | |
// Available under the MIT License | |
// Available at https://gist.github.com/zackdotcomputer/81b8545e3ce81128a299996814823963 | |
// |
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
// | |
// ShrinkingTableCell.swift | |
// ShrinkingTableCell | |
// | |
// Created by Zack Sheppard on 9/2/20. | |
// Copyright © 2020 Zack Sheppard. All rights reserved. | |
// Available under the MIT License | |
// Available at https://gist.github.com/zackdotcomputer/d365bfa5cd7e4a38d45c078b09459da3 | |
// |
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
// | |
// String+CountableRange.swift | |
// | |
// Created by Zack Sheppard on 8/30/20. | |
// Copyright © 2020 Zack Sheppard. All rights reserved. | |
// Available under the MIT License | |
// | |
import Foundation | |
/// This extension is available at |
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
// | |
// UIViewController+KeyboardAware.swift | |
// | |
// Created by Zack Sheppard. | |
// Copyright © 2020 Zack Sheppard. All rights reserved. | |
// Available under the MIT License | |
// | |
import UIKit |
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
// Copyright © 2020 Zack Sheppard. All rights reserved. | |
// Available under the MIT License | |
/// A few Sequence/Monad-like functions added to Optional | |
extension Optional { | |
/// Transform this optional into another type | |
@inlinable public func map<T>(_ transform: (Wrapped) throws -> T) rethrows -> T? { | |
if let inside = self { | |
return try transform(inside) | |
} else { |
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, { createContext, useContext, useEffect, useState } from "react"; | |
import { useWindowSize } from "react-use"; | |
const DisplayContext = createContext<"normal" | "compact">("normal"); | |
export default function Parent() { | |
const { width } = useWindowSize(); | |
const [windowSizeDisplayContext, setWindowSizeDisplayContext] = useState< | |
"normal" | "compact" |
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, { createContext, useContext } from "react"; | |
import { useWindowSize } from "react-use"; | |
const DisplayContext = createContext<"normal" | "compact">("normal"); | |
export default function Parent() { | |
const { width } = useWindowSize(); | |
let windowSizeDisplayContext = undefined; | |
if (width !== Infinity) { |
NewerOlder