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
Copy the project "app" inside C:\laragon\www\ to the ubuntu server with the written location, | |
for security reasons one has to add the public key (.pem) | |
_____________________________________________________________________________________________ | |
// Current dir in console has the .pem file | |
scp -r -i yourPublicKey.pem \laragon\www\app [email protected]:/home/bitnami/htdocs |
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 fetcher from "@/utils/fetcher"; | |
import useSWR from "swr"; | |
const useFetchAllSnippets = () => { | |
const { data, error } = useSWR("/api/snippet", fetcher); | |
return { | |
snippets: data, | |
isLoading: !error && !data, | |
isError: error |
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 useFetchAllSnippets from '@/hooks/useFetchAllSnippets' | |
import Snippet from '@/types/Snippet' | |
import SnippetItem from '@/components/snippet/SnippetItem' | |
import React from 'react' | |
const SnippetList = () => { | |
const { snippets, isError, isLoading } = useFetchAllSnippets() | |
if (isError) return <div>failed to load snippets</div> | |
if (isLoading) return <div>loading snippets...</div> |
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 useFetchAllSnippets from '@/hooks/useFetchAllSnippets' | |
import Snippet from '@/types/Snippet' | |
import SnippetItem from '@/components/snippet/SnippetItem' | |
import React from 'react' | |
const SnippetList = () => { | |
const { snippets, isError, isLoading } = useFetchAllSnippets() | |
if (isError) return <div>failed to load snippets</div> | |
if (isLoading) return <div>loading snippets...</div> |
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 { gql, useMutation } from '@apollo/client'; | |
import dynamic from 'next/dynamic'; | |
import { array, object, string } from 'zod'; | |
import { Form, useZodForm } from '../ui/Form'; | |
import Modal from '../ui/Modal'; | |
import TagSelection from './TagSelection'; | |
import TechSelection from './TechSelection'; | |
interface Props { | |
open: boolean; | |
setOpen: (open: boolean) => void; |